New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generateBundle hook should be executed after writing files when calling bundle.write #2617
Comments
Just stumbled upon the same issue. The Expected BehaviorThe
and the 2nd time with
|
Thanks for the feedback. I agree that there should be a hook that is called after the write has been performed. Not sure yet if it should be the same hook (after all it is called "generateBundle"). Just to clarify, what functionality do you want to trigger from this hook? After all, everything that is written is also available via the parameter of this hook. This might help in sketching out how this is addressed. At the moment, my feeling is that I would prefer to add a new hook, e.g. |
I prefer a new hook as well, I use |
Ah, that makes sense. I'll see what I can do. |
Fix at #2617 |
How Do We Reproduce?
Create a simple plugin which uses the
generateBundle
hook to read output file:This should be a bug since
onwrite
hook works as expected but it's deprecated in favor of this.Expected Behavior
Should be able to access output files when
isWrite
istrue
.Actual Behavior
No output files.
It seems
generateBundle
hook is always executed in thegenerate
function:rollup/src/rollup/index.ts
Line 293 in 4f19233
while
writeOutputFile
is called after that:rollup/src/rollup/index.ts
Line 320 in 4f19233
The text was updated successfully, but these errors were encountered: