this.getResolve is not a function VUE中使用sass
Posted ralapgao
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了this.getResolve is not a function VUE中使用sass相关的知识,希望对你有一定的参考价值。
1. 安装以下依赖
npm install node-sass --save-dev //安装node-sass npm install sass-loader --save-dev //安装sass-loader npm install style-loader --save-dev //安装style-loader
2. 修改weback.base.conf.js
module: { rules: [{ test: /.vue$/, loader: ‘vue-loader‘, options: vueLoaderConfig }, { test: /.js$/, loader: ‘babel-loader‘, include: [resolve(‘src‘), resolve(‘test‘), resolve(‘node_modules/webpack-dev-server/client‘)] }, { test: /.(png|jpe?g|gif|svg)(?.*)?$/, loader: ‘url-loader‘, options: { limit: 10000, name: utils.assetsPath(‘img/[name].[hash:7].[ext]‘) } }, { test: /.(mp4|webm|ogg|mp3|wav|flac|aac)(?.*)?$/, loader: ‘url-loader‘, options: { limit: 10000, name: utils.assetsPath(‘media/[name].[hash:7].[ext]‘) } }, { test: /.(woff2?|eot|ttf|otf)(?.*)?$/, loader: ‘url-loader‘, options: { limit: 10000, name: utils.assetsPath(‘fonts/[name].[hash:7].[ext]‘) } }, // 以下为新增 { test: /.scss$/, loaders: ["style", "css", "sass"] } ] },
3. 如果报错this.getResolve is not a function。。。。。。。
再进行修改package.json中的 "sass-loader": "^8.0.0" 改为7.3.1就可以了
以上是关于this.getResolve is not a function VUE中使用sass的主要内容,如果未能解决你的问题,请参考以下文章
What is the reason that a likelihood function is not a pdf?
python代码`if not x:` 和`if x is not None:`和`if not x is None:`使用
$(...).wordExport is not a function
小程序iOS Promise不支持finally语法 TypeError: undefined is not a function .finally is not a function