1๐
โ
I found what was my problem, I am sorry, but I still new with webpack.
I just install these packages:
npm install sass-loader sass webpack --save-dev
npm install --save-dev postcss-loader postcss
Then I just edited my webpack.config.js
file to be like this:
const path = require("path");
const webpack = require("webpack");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "./static/frontend"),
filename: "[name].js",
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
}
],
},
optimization: {
minimize: true,
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
// This has effect on the react lib size
NODE_ENV: JSON.stringify("production"),
},
}),
],
};
0๐
I had a same error because of the wrong webpack configuration:
{
test: /\.css$/,
exclude: /node_modules/,
use: ['style-loader', 'css-loader']
},
Iโve removed exclude
field from the object.
๐คmatrixb0ss
- [Answered ]-Django Rest Framework, two different approach to POST request
- [Answered ]-Shared memory in web application
- [Answered ]-How to access model with only two foreign keys?
- [Answered ]-Using Relationship Based Data in Model Definition โ Django
Source:stackexchange.com