运行npm run serve报错:
error
Conflict: Multiple assets emit different content to the same filename index.html
ERROR in Conflict: Multiple assets emit different content to the same filename index.html
webpack compiled with 1 error
冲突中的错误:多个资产向相同的文件名 index.html 发出不同的内容
产生原因:
一、 项目路径中存在中文名
二、 使用基架创建项目时,多个文件的名称重复。
解决方法:
一、 改纯英文路径名
二、 修改相关的 webpack 配置文件:
- 把
index.html文件重命名为index.ejs文件; - 在
node_nodules/webpack/bin/webpack.js中加入html: { template: './src/index.ejs' } - 重新运行
npm run serve