美文网首页前端新手
Nuxt Compiled with warnings - ex

Nuxt Compiled with warnings - ex

作者: 刘员外__ | 来源:发表于2020-12-03 15:30 被阅读0次
    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文件,引入同样的自定义组件,引入的先后顺序需要一样,否则就有对应的提示。虽然这个只是个提示,但对于我来说是不能忍的。

    解决办法:

    1. 把各个文件引入的组件顺序统一一下。这种方式显得太笨拙了,多人协作很难统一引入的顺序,显然不能采用;
    2. 通过翻阅nuxt文档,找到解决办法,在nuxt配置文件nuxt.config.js中设置如下即可。

    相关文章

      网友评论

        本文标题:Nuxt Compiled with warnings - ex

        本文链接:https://www.haomeiwen.com/subject/bxbmwktx.html