vue项目node-sass sass-loader node 版本对应问题
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass
免费下载资源
·
本人总结了一套万能无错的版本
node 8.11.2
sass-loader 7.3.1
node-sass 4.7.2
node版本对应的node-sass
sass-loader 4.1.1,node-sass 4.3.0
sass-loader 7.0.3,node-sass 4.7.2
sass-loader 7.3.1,node-sass 4.7.2
sass-loader 7.3.1,node-sass 4.14.1
使用国内镜像
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
安装对应版本
npm uninstall node-sass sass-loader
npm install sass-loader@版本号 node-sass@版本号 --save-dev
在vue.config.js配置
module.exports = {
css: {
loaderOptions: {
sass: {
// 全局sass变量
//sass-loader 8.0.0以前版本(包含)
prependData: `@import "~@/assets/scss/index.scss";`
}
}
},
}
module.exports = {
css: {
loaderOptions: {
sass: {
// 全局sass变量
//sass-loader10 新版本
additionalData: `@import "~@/assets/scss/index.scss";`
}
}
},
}
GitHub 加速计划 / no / node-sass
8.5 K
1.33 K
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
6081731a
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
62c0f46c
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)