4
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[0] has an unknown property 'option'. These properties are valid:    object { compiler?, enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resolve?, resource?, resourceQuery?, rules?, sideEffects?, test?, type?, use? }    -> A rule npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] webpack: `webpack` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] webpack script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

enter image description here

1 Answer 1

9

You have a typo here, you should have options instead of option in your module -> rules -> use :)

Should be something like this:

rules: [
      {
        test: /\.jsx?$/, // compilation to es6
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['react', 'es2015', 'es2016', 'stage-0'],
            plugins: ['syntax-dynamic-import'],
          },
        },
      },
]
Sign up to request clarification or add additional context in comments.

3 Comments

You have newer version of use, but nevertheless - it's all about option -> options :) cheers!
what is the problem then?
I m slove probelem tank you for u r help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.