[英]Vue js npm run build error in bundle.css Conflict: Multiple chunks emit assets to the same filename bundle.css (chunks app and chunk-f33d301e)
If I uncomment the below css extracting method in the vue.config.js file and run build for production.如果我在 vue.config.js 文件中取消注释下面的 css 提取方法并运行构建以进行生产。 I am getting the above mentioned error.我收到上述错误。
// vue.config.js file
// uncomment before executing 'npm run build'
css: {
extract: {
filename: 'bundle.css',
chunkFilename: 'bundle.css',
},
}
Am I supposed to pass the filename as variable.我应该将文件名作为变量传递吗? But these are default template code for extracting css during production build.但这些是用于在生产构建期间提取 css 的默认模板代码。
Try renaming the chunkFilename to eg just "bundle", because otherwise, the extracted CSS file and the chunkFile have the same file name.尝试将chunkFilename 重命名为例如“bundle”,否则,提取的CSS 文件和chunkFile 具有相同的文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.