-
-
Notifications
You must be signed in to change notification settings - Fork 272
Make worker cacheable #19
Comments
Maybe this was fixed since this issue was opened, but the worker should be cacheable by browsers, if that's what you mean. By default the worker script produced is named with a content-dependent hash in it (e.g. If you override the output file name (e.g. |
I think the issue comes from the output of
The worker file is processed each time a source file is changed, even if it does not touch the worker source or a module it depends on via |
@renchap If you will find a solution I will be glad to accept it :) |
Unfortunately I have no idea what causes this, and I a quick glance has not helped, I am not very familiar with Webpack plugins internals. I was just trying to clarify the issue :) |
https://github.com/webpack-contrib/worker-loader/blob/master/index.js#L22 explicitly seems to disable caching for some reason, so the question is if this is required for the loader to work correctly :) ? |
Looks like it has been added for Webpack 2 compat here: #24 by @dtinth, and confirmed it is needed by @sokra. From what I understand, it creates 2 visible effects:
|
Can the worker be made cacheable? I'm happy to create a pull request if it's possible.
The text was updated successfully, but these errors were encountered: