vue sass的安装

sass的安装

编译环境 所有装 --save-dev

npm install node-sass --save-dev

npm install sass-loader --save-dev

指定版本版本号

npm  install [email protected] --save-dev

npm  install [email protected] --save-dev

安装不成功需修改

window:C:\Users\[你的账户名称]\.npmrc

然后在 ~/.npmrc 加入下面内容 保险起见在.nrmrc中也加入 (没有该文件就新建)

home=https://npm.taobao.org

registry=https://registry.npm.taobao.org/

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

使用的时候在style 加入语言指定lang,sass的写法就可以正常使用 ,局部样式加入 scoped

<style lang="scss" scoped>

</style>

猜你喜欢

转载自blog.csdn.net/weixin_48424997/article/details/115979601