angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

Any scss updates causing full page refresh on new build #2355

Open stephengardner opened 7 years ago

stephengardner commented 7 years ago

New build... yo angular-fullstack Start server... gulp serve Edit any .scss file Watch page refresh.

How can we make webpack not reload the page? This is the point of the HMR built-in to webpack css

Item Version
generator-angular-fullstack 4.1.0
Node 6.2.2
npm 3.9.5
Operating System Windows 10
Item Answer
Transpiler TypeScript
Markup HTML

SCSS Router | ui-router Client Tests | Mocha DB | MongoDB Auth | Y

Awk34 commented 7 years ago

This will definitely require HMR for Angular 2 (generator version 5), as each component's SCSS file will be loaded directly with JS for each component. I believe our current config for 4.1.0 would also require HMR for this, since the CSS is getting injected into the page with style-loader. While this would make developing a lot nicer, I'm focused on trying to the the 5.0.0 beta out. If you'd like to work on this for the generator, it would be greatly appreciated.