-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Plugin] onEnd callbacks modify the build result #1792
Comments
Well |
I also found |
FYI. For anybody that comes across this in the future. I wasn't able to modify my build result by updating the build.onEnd((result) => {
const js = result.outputFiles.find(f => f.path.match(/\.js$/))
const modified = doSomething(js.text)
js.contents = Buffer.from(modified)
}) To see a fuller example (where I use it to instrument for code coverage) see marvinhagemeister/karma-esbuild#33 (comment) |
I used end callback to modify the build result,it works,but I can't return the new result。
also onEnd function type only support
void
orPromise<void>
The text was updated successfully, but these errors were encountered: