-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Add HMR when using component styles and template #39367
Copy link
Copy link
Closed
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilercore: hot module replacement (HMR)featureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration
Milestone
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilercore: hot module replacement (HMR)featureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration
I'm submitting a ... (check one with "x")
Current behavior
Although the Angular+Webpack docs present the combo as "an excellent alternative to the SystemJS approach", loading component styles via
stylesorstyleUrlsresults in a full page refresh, instead of style injection, which occurs when using SystemJS+lite-server.Expected behavior
A core feature of using Webpack+Webpack-dev-server in development is the availability of Hot Module Replacement. It is expected that HMR would work for css injection regardless of the style loading strategy used. Instead, currently changes to css or scss files which are included in a component's styles result in a full page reload.
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Speed up the Angular 2 development process for CSS developers
Please tell us about your environment:
Angular version: 2.0.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript 2.02 | ES6/7 | ES5]
Webpack version: 1.13.2
Webpack-dev-server version: 1.14.1
Node (for AoT issues):
node --version= 6.5.0