B
B
beefront172018-04-06 11:06:54
JavaScript
beefront17, 2018-04-06 11:06:54

How to migrate to webpack 4?

Good afternoon! Please help me deal with webpack 4
In version 3 there was this './webpack/index.js'

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./webpack.prod.config');
}  else {
  module.exports = require('./webpack.dev.config');
}

which, in accordance with the command, loaded the corresponding config
after updating to version 4.5 stopped working.
Command in package.json
"development": "cross-env NODE_ENV=dev webpack-dev-server --config ./webpack/webpack.dev.config.js",

Help, please understand.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2018-04-06
@Sanasol

Webpack has been initialised using a configuration object that does not match the API schema

I certainly won't read the error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question