sass的安装
编译环境 所有装 --save-dev
npm install node-sass --save-dev
npm install sass-loader --save-dev
指定版本版本号
npm install node-sass@5.0.0 --save-dev
npm install sass-loader@10.1.1 --save-dev
安装不成功需修改
window:C:\Users\[你的账户名称]\.npmrc
然后在 ~/.npmrc 加入下面内容 保险起见在.nrmrc中也加入 (没有该文件就新建)
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>