-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Plugins ignored after 2nd item in list #2607
Comments
This is because I'd recommend you to write an all-in-one plugin that do all works in one |
@hyrious but that seems like a flaw in the esbuild system though since it is how all other bundlers work? Making an all in one will solve the problem, but it's a band-aid because we should be able to stack multiple esbuild plugins in a list vs one giant plugin (which contradicts clean coding practices). In theory, the patch you are recommending is this:
Which will still fail. I feel like esbuild should definitely be able to handle this case and allow the standard plugin syntax:
|
Ah, OK, I see this small line here in the plugin docs that only one plugin in the list should return the
Guessing all esbuild plugins should essentially not return contents to ensure the entire list gets looped through? 🤷♀️ |
It would be helpful to be able to invoke more than one |
I'm using the latest version of esbuild
Current Behavior
When running the
esbuild.build
script, I'm running into a weird issue where the method will ignoreplugins
after the second one in the list. If I swap the plugins in position 2/3 the latter one works and previous one doesn't.Expected Behavior
The plugins in the list should run in order from first to last without being ignored.
Steps to reprodce
yarn create:bundles
BABEL WORKING...
loggedREPLACE WORKING...
logged - but it shouldThe text was updated successfully, but these errors were encountered: