We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When creating a plugin, throwing an error inside it won't stop the build, it will just cause it to timeout.
I didn't know how to create a repro on the playground for a plugin, so I am pasting the code of the plugin here:
import { Plugin, PluginBuild } from 'esbuild'; export const moduleExportsPlugin = (): Plugin => ({ name: 'module-exports', setup(build: PluginBuild) { build.onEnd(_result => { throw new Error('module.exports already exists, unknown use case'); }); }, });
It seems a regression, in v0.16.x It worked fine, since 0.17.x it causes the unexpected behaviour
The text was updated successfully, but these errors were encountered:
I can't reproduce this. Here's what I tried:
require('esbuild').build({ plugins: [{ name: 'name', setup(build) { build.onEnd(() => { throw new Error }) }, }], }).then( () => console.log('success'), () => console.log('failure'), )
That prints failure on the latest version of esbuild. You can also see this live in the playground.
failure
Sorry, something went wrong.
No branches or pull requests
Details
When creating a plugin, throwing an error inside it won't stop the build, it will just cause it to timeout.
How to reproduce
I didn't know how to create a repro on the playground for a plugin, so I am pasting the code of the plugin here:
Versions
It seems a regression, in v0.16.x It worked fine, since 0.17.x it causes the unexpected behaviour
The text was updated successfully, but these errors were encountered: