nuxt项目:css相关插件加载顺序问题【extract-css-chunks-webpack-plugin】

一、warning信息

chunk pages/channelManagement/qualification/create/pages/channelManagement/qualification/detail/pages/chan/c61aa583 [extract-css-chunks-webpack-plugin]    
Conflicting order. Following module has been added:
 * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--5-oneOf-1-2!./node_modules/less-loader/diref--5-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-1-3!./node_modules/sass-resources-loader/lib/loader.js??ref--5-oneOf-1-4!./node_modulduleComponents/newPolicyManagement/stamp-comfies/vue-loader/lib??vue-loader-options!./src/moduleComponents/newPolicyManagement/stamp-comfirm-dialog.vue?vue&type=style&index=0&id=e864c8c4&scoped=true&lang=less&
despite it was not able to fulfill desired ordering with these modules:                                                                                    ref--5-oneOf-1-2!./node_modules/less-loader/di
 * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??duleComponents/channelManagement/qualificationref--5-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-1-3!./node_modules/sass-resources-loader/lib/loader.js??ref--5-oneOf-1-4!./node_modules/vue-loader/lib??vue-loader-options!./src/moduleComponents/channelManagement/qualification/picInfoCard.vue?vue&type=style&index=0&lang=less&
   - couldn't fulfill desired order of chunk group(s) pages/channelManagement/qualification/detail, pages/channelManagement/qualification/exchange
   - while fulfilling desired order of chunk group(s) pages/channelManagement/qualification/create

二、问题分析:

插件引入顺序的问题:nuxt项目中,两个及以上的.vue文件,引入同样的自定义组件,引入的先后顺序需要一样,否则就有对应的warning。

三、解决问题: 

四、 代码:

extractCSS: {
   ignoreOrder: true
},

成功解决了! 

五、参考链接:

Nuxt Compiled with warnings - extract-css-chunks-webpack-plugin - 简书

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值