Can anyone help me to add styles using webpack configuration> I searched in many places, but didn't get proper answer .
I need it using sass loading.
I am new to angular2 and webpack too
Please help me?
Can anyone help me to add styles using webpack configuration> I searched in many places, but didn't get proper answer .
I need it using sass loading.
I am new to angular2 and webpack too
Please help me?
styles: [require('pathToCss/function.component.scss')]
also , in vendor.ts :
import './assets/css/style.scss';
You can use only styles and require your stylesheet with webpack styles:[require ('yourStyleSheet')]
NOTE:- due to an issue you have to use toString on required style
styles: [require("./app.styles.css").toString()]
Here is my github repo which use the same Note:- if you have used required you do not need to import it as the other answer mentioned because webpack will bundle it for you.