我尝试将scss样式文件加载到Vue 3项目中。
我用途:
"@vue/cli": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"@vue/compiler-sfc": "^3.0.11",
"sass": "^1.32.13",
"sass-loader": "^11.1.1",
"vue": "^3.0.11",
"vue-resource": "^1.3.4",
"webpack": "5.0.0"
我仍然面临着销售问题:
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
at Object.loader (/home/dev/src/my-app/node_modules/sass-loader/dist/index.js:25:24)
所有的都是最新的,我已经删除了我的node_modules并重新安装了它们。我也删除了node-sass,所以我只有sass包。
1条答案
按热度按时间pprl5pva1#
我今天也犯了同样的错误
从“sass加载程序”更改:“^12.0.0”到“sass加载程序”:“^10.1.1”
运行:
对我来说它解决了