vue-cli webpack躺坑之旅

1、Sass -- vue解决sass-loader的版本过高导致的编译错误

  Module build failed: TypeError: this.getResolve is not a function
        at Object.loader (C:\Users\Baicells\Desktop\htmlTemplate\node_modules\sass-loader\dist\index.js:52:26)
    
     @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-0b9912b5","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/dist/cjs.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/app.vue

解决办法:cd到项目文件里面运行下面

  npm uninstall sass-loader(卸载当前版本 -- 我的是9.0.1)

  npm install sass-loader@7.3.1 --save-dev

 

vue-cli webpack躺坑之旅

上一篇:tolua++中的垃圾回收


下一篇:【toLua++】toLua++编译生成tolua++.exe史上完整版