Reputation: 69
I have just started learning Angular 2 through a tutorial.
I made a new project using ng new firstapp
. Whenever I make changes to app.component.ts
and save the file, the angular-cli always compiles successfully, displaying webpack: Compiled successfully
.
However, sometimes it immediately reflects the changes in browser whilst most of the times it doesn't show any change. After I searched for the issue, someone suggested to try disabling the cache using Chrome developer tools but it didn't help. I am a beginner.
I am using WebStorm as my IDE. However when I made changes using SublimeText, the browser reflected the changes immediately. I guess it has got something to do with WebStorm. I'd like to carry on using WebStorm, as I love its features.
Upvotes: 3
Views: 1304
Reputation: 93868
When using webpack-dev-server, it’s recommended to disable the IDE Safe write feature (Use "safe writes" (save changes to a temporary file first)
, Settings | Appearance & Behavior | System Settings
) , otherwise, the app won’t be updated on-time on changes. This issue is fixed in Webpack 2
Upvotes: 3