Closed lacolaco closed 5 years ago
@developit Could you let me know your view? Thanks.
I've released this as 2.0.1 - give it a try and let me know if it works. I think we'll probably be playing whack-a-mole disabling plugins for a while though. If it causes too many issues we'll have to switch to having an option of "plugins to allow".
@developit Thank you! In my case, v2.0.1 works perfectly. I've confirmed no errors and no degradation.
My story is here: https://medium.com/lacolaco-blog/an-issue-around-angular-cli-comlink-workerplugin-585be1c8d087
My friend @manfredsteyer figured out the cause of the error. WorkerPlugin creates a child webpack compiler for worker module's compilation.
https://github.com/GoogleChromeLabs/worker-plugin/blob/master/src/loader.js#L42
createChildCompiler
API takes three arguments; its name, outputOptions, and plugins. The current implementation in WorkerPlugin doesn't pass the 3rd argument, so the child compiler doesn't has plugins inherited from the parent.Solution:
Add the 3rd argument and pass
compilerOptions.plugin
.In my case, it works well as I expected.
If this is by design, I'd like to know the reason.