gpt4 book ai didi

nuxt.js - Nuxt编译时带有警告-Extract-css-chunks-webpack-plugin

转载 作者:行者123 更新时间:2023-12-03 09:36:26 25 4
gpt4 key购买 nike

我正在处理一个包含多个文件和文件夹的大项目。现在,当我运行npm run dev或更改页面时,Nuxt正在显示这些烦人的警告。

 WARN  Compiled with 7 warnings                       friendly-errors 11:11:49


WARN Error friendly-errors 11:11:49

chunk pages/add-new-property/index.pages/property/index.pages/room-management/add-new/index.pages/signup/index [extract-css-chunks-webpack-plugin]
Conflicting order. Following module has been added:
* css ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./node_modules/vuetify-loader/lib/loader.js??ref--16-0!./node_modules/vue-loader/lib??vue-loader-options!./components/property/policies/yes-no-box.vue?vue&type=style&index=0&id=67558805&lang=scss&scoped=true&
despite it was not able to fulfill desired ordering with these modules:
* css ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./node_modules/vuetify-loader/lib/loader.js??ref--16-0!./node_modules/vue-loader/lib??vue-loader-options!./components/UI/checkbox/checkbox.vue?vue&type=style&index=0&lang=scss&
- couldn't fulfill desired order of chunk group(s) pages/property/index, pages/room-management/add-new/index
- while fulfilling desired order of chunk group(s) pages/add-new-property/index, pages/signup/index
. . .
那只是7条警告之一。
谁能告诉我如何解决,或者至少忽略Nuxtjs中的那些警告?请注意,警告来自 extract-css-chunks-webpack-plugin 而不是 mini-css-extract-plugin
编辑:仅在开发中会出现此问题,这很烦人,因为当您第一次加载页面时不会加载样式。因此,您必须手动刷新页面。但是刷新后,如果再次访问该页面,一切都很好。

最佳答案

您可以在nuxt.config.js中添加 ignoreOrder 属性

build: {
extractCSS: {
ignoreOrder: true
}
}

关于nuxt.js - Nuxt编译时带有警告-Extract-css-chunks-webpack-plugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61472873/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com