configuration has an unknown property 'applyWebpackOptionsDefaults'
See original GitHub issuegot this error when using react-scripts webpack config
- configuration has an unknown property 'applyWebpackOptionsDefaults'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, experiments?, externals?, externalsPresets?, externalsType?, ignoreWarnings?, infrastructureLogging?, loader?, mode?, module?, name?, node?, optimization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, snapshot?, stats?, target?, watch?, watchOptions? }
-> Options object as provided by the user.
For typos: please correct them.
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
applyWebpackOptionsDefaults: …
}
})
]
What is the expected behavior?
Other relevant information: webpack version: “^5.21.2” Node.js version: v14.15.4 Operating System: ubuntu Additional tools:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
webpack error configuration.module has an unknown property ...
Webpack has been initialised using a configuration object that does not match the API schema. - configuration has an unknown property 'debug'.
Read more >Webpack has been initialized using a configuration object
Webpack has been initialized using a configuration object that does not match the API schema. - configuration.module.rules[10] has an unknown property ...
Read more >options has an unknown property 'before'. these ... - You.com
got this error when using react-scripts webpack config. - configuration has an unknown property 'applyWebpackOptionsDefaults'. These properties are valid: ...
Read more >webpack打包报错:configuration has an unknown property ...
Webpack has been initialized using a configuration object that does not match the API schema. - configuration has an unknown property ...
Read more >Webpack 5 Migration - Medium
property not required now. error: options has an unknown property 'prependData'. prependData -> additionalData; error: configuration.output has an unknown ...
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
@jasoncaii try to change in start.js by replacing below line:-
const compiler = createCompiler(webpack, config, appName, urls, useYarn);
Replace above line by
const compiler = createCompiler({webpack, config, appName, urls, useYarn});
Also try to replace loaders with rules in webpack.config.js file
@yashmudgal05 Did you fixed it?I have the same problem 😂 Can you share the solution