threads-plugin
threads-plugin copied to clipboard
Options for extracted .worker.js file
The plugin works well as expected but it would be nice to have some options for the output js file. I have a worker called my-worker and using this plugin its production js file will be '0.my-worker.worker.js'. Can we somehow specify it? For example, I have my source file assets in a subdirectory, so I would like to import it using 'subdirectory/0.my-worker.worker.js' in my main.js production file otherwise it won't work because the output files will not be there but in the sub directory.
Hey @BarthaBRW!
Sorry, I must have missed the notification about this issue. Yeah, seems like a good idea to add such an option.
Can you contribute a PR?
Unfortunately, looking at the code I don't think I can but a workaround is to replace the url in the bundle using ReplaceInFileWebpackPlugin.