I'm writing a webpack plugin that includes an additional file in the bundle (using child compiler). This works fine, but now I want to add watch support. The problem is, that the included file potentially depends upon all files in the main compiler instance, because I'm extracting functions from there. Normally this will break down only to a small subset of files that are actually using some of the functionality provided by the plugin. My idea was to implement the watch support by using a version flag that is incremented whenever my plugin needs to compile the resources again... However, the version only changes AFTER all files from the parent compiler have been compiled. Is there a way to enforce a rebuild of a module AFTER the files of the parent has compiled but before the assets are emitted (emit event is fine, if I'm allowed to request a rebuild of a module there)?
Asked
Active
Viewed 525 times