sass-loader的版本过高导致的编译错误
Module build failed: TypeError: this.getResolve is not a function
at Object.loader (D:\study\mpvue实战\mpvue-dushu\node_modules\sass-loader\dist\index.js:52:26)

@ ./node_modules/extract-text-webpack-plugin/dist/loader.js?{"omit":1,"remove":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{"minimize":false,"sourceMap":false}!./node_modules/mpvue-loader/lib/style-compiler?{"vue":true,"id":"data-v-6ce044b7","scoped":true,"hasInlineConfig":false}!./node_modules/px2rpx-loader?{"baseDpr":1,"rpxUnit":0.5}!./node_modules/postcss-loader/lib?{"sourceMap":true}!./node_modules/sass-loader/dist/cjs.js?{"sourceMap":false}!./node_modules/mpvue-loader/lib/selector.js?type=styles&index=0!./src/pages/index/index.vue 4:14-555
@ ./src/pages/index/index.vue
@ ./src/pages/index/main.js

解决办法

卸载当前版本sass-loader

npm uninstall sass-loader

安装一个合适版本的

npm install sass-loader@7.3.1 --save-dev
文章作者: RouRouX
文章链接: https://rouroux.github.io/sass-loader-err/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 RouRouX's Blog