vue-cli 使用scss 安装 安装node-sass失败问题

1,203 阅读1分钟

npm install node-sass --save-dev(一直安装失败,github位置搬了所以换成下面的命令)

1、

npm install --save node-sass --registry=https://registry.npm.taobao.org--disturl=https://npm.taobao.org/dist --sass-binary-site=http://npm.taobao.org/mirrors/node-sass

2、

npm install sass-loader --save-dev

3、

在webpack.base.conf.js 文件下的配置 rules

    {
        test: /\.scss$/,
        loader: ["style", "css", "scss"]
    },

原文地址