react-yelp-clone icon indicating copy to clipboard operation
react-yelp-clone copied to clipboard

configuration has an unknown property 'postcss'. These properties are valid:

Open jimmyFlash opened this issue 5 years ago • 0 comments

After adding :

 config.postcss = [].concat([
        require('precss')({}),
        require('autoprefixer')({}),
        require('cssnano')({})
    ])

I'm getting the following error : \node_modules\webpack\lib\webpack.js:19 throw new WebpackOptionsValidationError(webpackOptionsValidationErrors); ^

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration has an unknown property 'postcss'. These properties are valid: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? } For typos: please correct them. For loader options: webpack 2 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: { postcss: ... } }) ] at webpack (E:\projects\React\yelpReact\node_modules\hjs-webpack\node_modules\webpack\lib\webpack.js:19:9) at Object. (E:\projects\React\yelpReact\node_modules\hjs-webpack\bin\hjs-dev-server.js:53:16) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Function.Module.runMain (module.js:605:10) at startup (bootstrap_node.js:158:16) at bootstrap_node.js:575:3

jimmyFlash avatar Jul 03 '19 11:07 jimmyFlash