You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the webpack config example in README.md about line 1080 contains some abuses that can cause webpack reports an error:
Uncaught:
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.module.rules[0].use[3] has an unknown property 'test'. These properties are valid:
object { ident?, loader?, options? }
**webpack.config.js**
```js
module.exports = {
module: {
rules: [
{
// For CSS modules
// For pure CSS - /\.css$/i,
// For Sass/SCSS - /\.((c|sa|sc)ss)$/i,
// For Less - /\.((c|le)ss)$/i,
test: /\.((c|sa|sc)ss)$/i,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
// Run `postcss-loader` on each CSS `@import`, do not forget that `sass-loader` compile non CSS `@import`'s into a single file
// If you need run `sass-loader` and `postcss-loader` on each CSS `@import` please set it to `2`
importLoaders: 1,
// Automatically enable css modules for files satisfying `/\.module\.\w+$/i` RegExp.
modules: { auto: true },
},
},
{
loader: 'postcss-loader',
options: { plugins: () => [postcssPresetEnv({ stage: 0 })] },
},
// Can be `less-loader`
// The `test` property should be `\.less/i`
{
- test: /\.s[ac]ss$/i,+ // This `test` key is invalid in Rule#UseEntry, recommend to+ // delete this line and comment together with `For CSS modules...` above+ // test: /\.s[ac]ss$/i,
loader: 'sass-loader',
},
],
},
...
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Documentation Is:
Please Explain in Detail...
I found the webpack config example in
README.md
about line 1080 contains some abuses that can cause webpack reports an error:Your Proposal for Changes
README.md#L1080
The text was updated successfully, but these errors were encountered: