Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Switching Webpack Config keeps file watches around #115

Closed
gostay opened this issue May 23, 2018 · 3 comments
Closed

Switching Webpack Config keeps file watches around #115

gostay opened this issue May 23, 2018 · 3 comments

Comments

@gostay
Copy link

gostay commented May 23, 2018

Steps to Reproduce

  • Open CDK project
  • Switch to another webpack config with Run -> Set Webpack Config
  • Edit a file referenced by the previous webpack, but not the new one
  • Notice the webpack recompile that happens anyway.

Error

After you switch to a new webpack config, the CDK seems to keep watching files that were referenced by the previous webpack config (in addition to the new ones).

Editor Details

Version: 1.0.0
Mixer User ID: 32316796

Encrypted Editor State: {"id":"3ad178dddd4bcf36","password":"R4hIsICmiwje/CgLsErfCw6hZkqPmyAm5aN6JaV0WOc="}

@connor4312 connor4312 self-assigned this May 23, 2018
@connor4312
Copy link
Contributor

I'll look into this but it's quite possible this is intended behavior on the behalf of webpack, some of its file watchers are attached pretty bluntly depending on the set of configuration and plugins.

@connor4312 connor4312 added this to the v1.1 milestone May 23, 2018
@gostay
Copy link
Author

gostay commented May 23, 2018

Thanks! In case it's helpful: One thing I noticed in my testing was that if I close and restart the CDK, then it only watches the files it needs to for the currently selected webpack config. It's only when I switch from one to the other that it seems to watch both, which is the weird part.

I should also add that this is not a big deal. It hardly ever comes up. And the impact is almost unnoticeable. It's just something I noticed that I thought you might want to know about.

@connor4312
Copy link
Contributor

Looks like it actually doesn't kill the old webpack process, so it is a little more important, as it's effectively a memory leak -- switching between multiple processes often could make you run out of memory!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants