简体   繁体   English

Vue js npm 在 bundle.css 中运行构建错误

[英]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.

相关问题 如何制作bundle.css和bundle.js文件 - How to make bundle.css and bundle.js files Webpack css 问题,缺少 bundle.css - Webpack css issue, missing bundle.css 冲突:多个块将资产发送到相同的文件名 ./plugin.min.css - Conflict: Multiple chunks emit assets to the same filename ./plugin.min.css 无法将所有css文件与bundle.css和具有bundle.js的webpack合并 - Not able to combine all css files with bundle.css with webpack like bundle.js Webpack,优化分块给出“冲突:多个块将资产发送到相同的文件名”错误 - Webpack, optimization chunking gives “Conflict: Multiple chunks emit assets to the same filename” error Rollup.js - 让 PostCSS 处理整个 bundle.css 而不是来自 rollup-plugin-svelte 的单个文件 - Rollup.js - have PostCSS process whole bundle.css instead of individual files from rollup-plugin-svelte React + Webpack提取文本插件。 我究竟做错了什么? 我的样式从bundle.js工作,但是我试图将它们移到bundle.css - React + Webpack Extract Text Plugin. What am I doing wrong? My styles work from bundle.js, but I am trying to move them out to bundle.css 如何修复Webpack中的“冲突:多个资产发出相同的文件名”错误? - How to fix “Conflict: Multiple assets emit to the same filename” error in Webpack? 冲突中的错误:多个资产向相同的文件名发出不同的内容 - ERROR in Conflict: Multiple assets emit different content to the same filename 冲突:多个资产发出相同的文件名 - Conflict: Multiple assets emit to the same filename
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM