[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization.splitChunks has an unknown property 'CacheGroups'. These properties are valid:
object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports?}
-> Options object for splitting chunks into smaller chunks.
Previous version:
CacheGroups:{
vendor:{
test:/[\\/]node_modules[\\/]/,
name:'vendors',
chunks:'all'
}
}
The solution is to reduce the version or follow the new writing method
New writing:
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
Read More:
- How to Fix Webpack run error webpack dev server
- How to Solve webpack -v View Error in vsode
- How to Solve Error: Cannot find module ‘webpack/lib/RequestShortener’
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- [Solved] Webpack compilation Error: Cannot find module’webpack-cli/bin/config-yargs’
- webpack4 Use webpack-dev-server Error [How to Solve]
- How to Solve Error:options.query cannot be used with loaders
- How to Solve Error: Module did not self-register
- How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- How to Solve Import antd Error: Module build failed
- Error: env [NODE_ENV] is not set (How to Solve)
- How to Solve elasticsearch and logstash Install Error
- How to Solve Node GYP Rebuild Error
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- How to Solve Android jetpack Room Schema export Error
- How to Solve screenfull plug-in Error (Version Issues)
- How to Solve forEach cannot exit the loop Issue
- How to Solve ceph-deploy Error (Three Errors)
- How to Solve AOP error in Spring
- How to Solve Hyperf Failed to Start Error After Aliyun ACM Installed