簡體   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)

如果我在 vue.config.js 文件中取消注釋下面的 css 提取方法並運行構建以進行生產。 我收到上述錯誤。

// vue.config.js file

// uncomment before executing 'npm run build'
    css: {
        extract: {
          filename: 'bundle.css',
          chunkFilename: 'bundle.css',
        },
    }

我應該將文件名作為變量傳遞嗎? 但這些是用於在生產構建期間提取 css 的默認模板代碼。

嘗試將chunkFilename 重命名為例如“bundle”,否則,提取的CSS 文件和chunkFile 具有相同的文件名。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM