阅读:5636回复:1
webpackdevserver报错 validateSchema is not a function
网上查,发现是webpack-dev-server版本的原因:
我就直接在项目里卸载了2.1.0-beta.10版本的webpack-dev-server 安装2.2.0 cnpm install webpack@2.2.0 --save-dev cnpm install webpack@2.2.0 --save-dev 然后配置webpack.config.js "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build":"node_modules/.bin/webpack", "start":"webpack-dev-server --entry ./src/js/test.js --output-filename ./dist/bundle.js" } 输入命令cnpm run build进行打包 5、输入cnpm start运行webpack-dev-server 因为我整个文件为了防止失败,没有多写,只在出口文件中写入console.log(1),所以最后的运行结果就是 总之成功了!!! |
|
沙发#
发布于:2020-03-26 23:21
|
|