Closed fregante closed 3 years ago
If it included import calls they’re now broken.
What did you mean? It was supposed to just work.
The only option I’m aware of is to have a whole new webpack config/build specific to this file in order to exclude this plugin.
I'm affraid so if that doesn't work. You can feed an array of configs to webpack so it should be alright.
Thank you for the quick answer!
If it included import calls they’re now broken.
What did you mean? It was supposed to just work.
runtime.getURL
is not available on the web:
so unless __webpack_public_path__
can be completely hardcoded (this workaround wouldn't work either) I don't think this injection would ever work, regardless of this plugin.
I think the only way to support such scripts would be to stop code splitting altogether. I think this is doable via an infinite splitChunks.minSize
or via the more explicit LimitChunkCountPlugin
We have this case too. We use a separate webpack config to pack it.
I have a file that is being injected in the “unsafe context” via script tag in order to access the data/variables in the live website. This file is being executed outside the extension context and is not a content script.
How do you suggest I exclude it from this plugin? If it included
import
calls they’re now broken. Do you think it’s possible to disable the plugin on specific files, either via webpack config or plugin config?The only option I’m aware of is to have a whole new webpack config/build specific to this file in order to exclude this plugin.