I am working on an Angular 2 application and am currently trying to create it using Webpack 2 (this is my first foray into Webpack).
I understand the difference between style-loaderand to-string-loader, the former adds CSS to the DOM, the latter creates a string array for Angular 2 to consume through the property styles.
My question is: can I have both? Or in another way, if I have global styles in a file site.css, what is the correct way to link to Webpack without changing behavior for component styles ( to-string-loader, css-loader)?
Just needing or importing them into main.tsseems to be insufficient for Webpack to figure out what to do.
source
share