Answer the question
In order to leave comments, you need to log in
Why is ExtractTextPlugin not working?
Hello! I am learning to use webpack, the ExtractTextPlugin plugin does not work, in the end I even copied the entire tutorial code, it did not help.
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract(
{
fallback: 'style-loader',
use: ['css-loader']
})
}
]
},
plugins: [
new ExtractTextPlugin({filename: 'style.css'})
]
ERROR in ./src/style.css 1:5
Module parse failed: Unexpected token (1:5)
You may need an appropriate loader to handle this file type, currently no loader
s are configured to process this file. See https://webpack.js.org/concepts#loade
rs
> body {
| background-color: red;
| }
@ ./src/index.js 1:0-20
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question