chunk pages/xpin/album_detail/_id/pages/xpin/brand_detail/_id/pages/xpin/goods_detail/_id/pages/xpin/goods/6762022c [extract-css-chunks-webpack-plugin] friendly-errors 15:09:21
Conflicting order. Following module has been added:
* css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/stylus-loader??ref--8-oneOf-1-3!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/xpin/Collect.vue?vue&type=style&index=0&id=77bbb45a&lang=stylus&scoped=true&
despite it was not able to fulfill desired ordering with these modules:
* css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/stylus-loader??ref--8-oneOf-1-3!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/xpin/TrailerDialog.vue?vue&type=style&index=1&id=0a5e0078&lang=stylus&scoped=true&
- couldn't fulfill desired order of chunk group(s) pages/xpin/goods_detail/_id
- while fulfilling desired order of chunk group(s) pages/xpin/index, pages/xpin/goods_list/index, pages/xpin/yxuan/index, pages/xpin/album_detail/_id, pages/xpin/brand_detail/_id, pages/xpin/rank_list/_id, pages/xpin/user_home/_id
看提示是组件引入顺序的问题:nuxt项目中,两个及以上的.vue文件,引入同样的自定义组件,引入的先后顺序需要一样,否则就有对应的提示。虽然这个只是个提示,但对于我来说是不能忍的。
解决办法:
- 把各个文件引入的组件顺序统一一下。这种方式显得太笨拙了,多人协作很难统一引入的顺序,显然不能采用;
- 通过翻阅nuxt文档,找到解决办法,在nuxt配置文件
nuxt.config.js
中设置如下即可。
网友评论