-
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
Give plugins access to build options #373
Comments
I fear I made a bad proposal. |
I think other bundler plugin APIs give plugins the ability to modify the user-specified options object. I think that should be sufficient for this and other use cases. Something like |
Having the ability to modify the options object from within the plugin would indeed be perfect! |
Support for this is in the latest release. Documentation is here: https://esbuild.github.io/plugins/#build-options. |
I am writing a plugin to compile Imba code. The plugin needs to be able to resolve files with
.imba
extension.Therefore,
.imba
needs to be added toresolveExtensions
when triggering the build process.Right now the whole array gets overwritten:
resolveExtensions: [".tsx", ".ts", ".jsx", ".mjs", ".cjs", ".js", ".json", ".imba"]
I propose to let plugins return a string or an array of additional extensions to add to resolveExtensions.
The text was updated successfully, but these errors were encountered: