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

Implementation of async build script escape hatch #193

Open
mrgrain opened this issue Aug 7, 2022 · 2 comments
Open

Implementation of async build script escape hatch #193

mrgrain opened this issue Aug 7, 2022 · 2 comments
Labels

Comments

@mrgrain
Copy link
Owner

mrgrain commented Aug 7, 2022

Using the escape hatch, provide an implementation that spawns a sub process to run an (more or less) arbitrary build script in async mode, so plugins can be used.

Turn the esbuild-plugins example into a ready to use provider.

@mrgrain mrgrain added this to Roadmap Aug 7, 2022
@mrgrain mrgrain moved this to Ideas in Roadmap Aug 7, 2022
@mrgrain mrgrain moved this from Ideas to Todo in Roadmap Jan 8, 2023
@mrgrain mrgrain moved this from Todo to Ideas in Roadmap Jan 8, 2023
@mrgrain
Copy link
Owner Author

mrgrain commented Nov 10, 2024

Using worker threads, this can probably be simplified to a module providing the plugins. I think that will be as good as it gets.

@bilalq
Copy link

bilalq commented Jan 6, 2025

This would be really nice. Using source maps on the first-party CDK Nodejsfunction construct causes them to completely blow up on occasion. Errors go from bad to catastrophic because large node_modules and JSON files can cause sourcemap resolution to make your function crash due to excessive memory usage. ESBuild plugins allow you to exclude these, but the API exposed through the Nodejsfunction interface doesn't let you use plugins. The custom ESBuild provider solution in this lib works, but it's so much ceremony and boilerplate right now to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ideas
Development

No branches or pull requests

2 participants