Angular 7 “expected 'styles' to be an array of strings”

前端 未结 6 1739
借酒劲吻你
借酒劲吻你 2021-01-07 23:53

I am trying to run my server and have my app.component.html load on localhost:8000. Instead, I am receiving this error

compiler.js:7992 Uncaught Error

6条回答
  •  囚心锁ツ
    2021-01-08 00:38

    changing scss loader in webpack.config.js fixed it for me. It should look like this:

    {
      test: /\.scss$/,
      exclude: [/node_modules/, /\.global\.scss$/],
      use: ["to-string-loader", "css-loader", "sass-loader"]
    }
    

    and in package json:

    "to-string-loader": "^1.1.6",
    "css-loader": "^3.4.2",
    "sass-loader": "^8.0.2"
    

提交回复
热议问题