outputOptions
hook does not allow to switch dir
and file
#2801
Labels
outputOptions
hook does not allow to switch dir
and file
#2801
How Do We Reproduce?
in plugin:
Expected Behavior
Rollup writes the chunks as files in the specified folder.
Actual Behavior
Rollup exits with the following error:
Explanation
I am building a web worker loader plugin, it already has the ability to inline the worker code, but I would also like to provide the option to emit a worker script file that is loaded at runtime.
The way the worker code is bundled right now is by using Rollup's JS interface within the plugin to build the worker code as a new module. At the end of this process I get a chunk with the code that I can then inspect and inject to inline the Worker, to emit a worker script file the easiest solution is to add the resulting chunk to the bundle in the
generateBundle
hook and let rollup write the file.If the original
outputOptions
object already usesoutput.dir
everything works as expected, but Rollup won't allow me to switchoutput.file
foroutput.dir
as demonstrated in the code above.The text was updated successfully, but these errors were encountered: