Webpack compiling twice most of the time

I am usin Webstorm writing Angular in typescript.  When I save changes, webpack compiles, but when I click my project page in the browser, webpack compiles again, and sometimes it compiles twice if I touch the browser, without saving first.

I guess this can be fixed in webpack configuration but I don't know how.

Thanks, gsmari

0
3 comments

>when I click my project page in the browser, webpack compiles again

Well... Normally Webstorm auto-saves files when you move focus out of it (to the browser, for example) -can it be the issue?

Also, please try disabling Use "safe write" in Settings | Appearance & Behavior | System Settings - does it make any difference?

0
Avatar
Permanently deleted user

Tried disabling "safe write", seems to help a little sometimes, can I turn off the "auto-save on focus out" ?  I would like til save manually only, then webpack would not "double detect" the changes.

0

Yes - in Settings | Appearance & Behavior | System Settings, disable Save files on frame deactivation

0

Please sign in to leave a comment.