CssSyntaxError (1:1) Unknown word > 1 | // extracted by mini-css-extract-plugin
See original GitHub issue mode: 'production',
devtool: '#source-map',
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new MiniCssExtractPlugin({
filename: path.resolve(__dirname, '../dist/css/[name].[contenthash].css')
})
],
module: {
rules: [{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
]
}]
}
ERROR in ./src/style/style.css (./node_modules/_css-loader@2.1.0@css-loader/dist/cjs.js!./node_modules/_mini-css-extract-plugin@0.5.0@mini-css-extract-plugin/dist/loader.js!./node_modules/_css-loader@2.1.0@css-loader/dist/cjs.js!./src/style/style.css) Module build failed (from ./node_modules/_css-loader@2.1.0@css-loader/dist/cjs.js): CssSyntaxError
(1:1) Unknown word
1 | // extracted by mini-css-extract-plugin | ^
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:17 (3 by maintainers)
Top Results From Across the Web
unknown word" with webpack.config.js file - Stack Overflow
In webpack, when you list multiple loaders within a rule, they are evaluated from right to left (in your case, bottom to top), ......
Read more >MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >mini-css-extract-plugin - npm
extracts CSS into separate files. Latest version: 2.7.2, last published: 23 days ago. Start using mini-css-extract-plugin in your project by ...
Read more >“Unknown word” error showing after adding postcss-loader
I am trying to add postcss loader in my webpack but after adding postcss loader showing Unknown word error . I also attached...
Read more >Separating CSS | webpack surviveJS - GitHub Pages
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); exports. ... build failed: CssSyntaxError: or Module build failed: Unknown word error, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fangshuaituo you have multiple loader for
css
please check your configuration, see on error,css-loader
again execute on extracted fileLooks
baseWebpackConfig
already contains rules forcss