Skip to content Skip to sidebar Skip to footer

How To Import .scss File To App.js Parent File As A Global?

I'm starting an Angular project and have been following these steps to import the scss files - https://github.com/AngularClass/angular-starter/wiki/How-to-include-SCSS-in-component

Solution 1:

Firstly, sassLoader and postcss are not valid webpack config attributes https://webpack.js.org/configuration

The way you would typically go about it is to add the .scss file to your entry

  entry: {
    app: './src/app.js',
    styles: './pathtoyourstyles/style.scss'
  },

and then add the appropriate loaders.

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

Post a Comment for "How To Import .scss File To App.js Parent File As A Global?"