webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

时间:2024-04-04 22:26:35

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

解决办法:在webpack.config.js 里面添加或者修改 mode为development

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

由于我事先没有安装了babel-loader,所以后面又报错:ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\00new\webpack-demo'

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

解决办法:打开cmd命令行,npm install babel-loader --save  安装即可

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

我的还需要在Terminal安装一次

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

结果安装了最新版本,依赖包不兼容o(╥﹏╥)o,只好回退到7版本:npm install -D [email protected] babel-core babel-preset-env

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object

后面又出现几个需要安装的,安装好就行,但是在打包时还是报错了,卑微请求大佬指点(〒︿〒)

webpack打包时报错:Invalid configuration object. Webpack has been initialised using a configuration object