Invalid configuration object. Webpack has been initialised using a..

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

Invalid configuration object. Webpack has been initialized with a configuration object that does not match the API pattern.

Solution 1:

npm install webpack-cli -g
#install

Solution 2:

Put your webpackconfig.js Change it to the following one

var path = require('path');

module.exports = {
entry: './main.ts',
resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.js']
},
module: {
rules: [
{ test: /.ts$/, loader: 'ts-loader' }
]
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
}
};

Similar Posts: