Skip to content
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

There are no means of setting the esbuild format to ESM #3102

Closed
giseburt opened this issue Nov 9, 2023 · 1 comment · Fixed by #3103
Closed

There are no means of setting the esbuild format to ESM #3102

giseburt opened this issue Nov 9, 2023 · 1 comment · Fixed by #3103
Labels
enhancement New feature or request

Comments

@giseburt
Copy link
Contributor

giseburt commented Nov 9, 2023

When building a TypeScript App to bundle with the Bundler, things like top-level await need bundled differently.

esbuild provides this control via the --format=esm flag: https://esbuild.github.io/api/#format

There's not even a clean escape hatch that doesn't completely blow away the build tasks. (There's no means of adding to a task command, AFAICT, and I'm not sure I'd really want to do that anyway, as it seems terribly fragile.)

This is simple to add, and I'll have a PR for it ready soon.

giseburt added a commit to giseburt/projen that referenced this issue Nov 9, 2023
@mrgrain mrgrain added the enhancement New feature or request label Nov 10, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Nov 10, 2023

Do we also want to add escape hatches for other unsupported / unknown options in esbuild? Similar to how the AWS CDK NodejsFunction has the esbuildargs?

@giseburt Yes! That would be awesome!

@mergify mergify bot closed this as completed in #3103 Nov 10, 2023
mergify bot pushed a commit that referenced this issue Nov 10, 2023
Fixes #3102

---
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants