-
Notifications
You must be signed in to change notification settings - Fork 196
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
Custom bundling (esbuild) config #3410
Comments
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Just ran into the error described here https://answers.netlify.com/t/lambda-functions-fastify-error-cannot-find-module-string-decoder/40219/12 in one of the examples. The solution outlined there
|
A related use case is running |
@skorfmann would it make sense to always build with this setting when bundling for aws lambda? |
Dependencies such as the |
This would help with using jsx in the Typescript SDK as well, e.g. something like this winglang/examples#45 |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
See also the bundling options offered by CDK here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.BundlingOptions.html One design option could be to have some way to configure bundling on a per new cloud.Function(handler,
env: {
"KEY": "VALUE",
},
bundling: {
external: ["fsevents"],
minify: false,
}
); Another option is to have some way to configure bundling app-wide: // inside the platform or in Wing, both can be supported
std.bundling.configure(
external: @app.target == "aws" ? ["fsevents", "aws-sdk"] : ["fs-events"],
minify: false,
); When we expose an API for serializing an inflight into a string, bundling options would also be exposed for that naturally (this would be the lowest level). @eladb thoughts? |
Good idea - I think it might be sufficient as an initial step just support this at the app level. Only thing, I'd try to avoid a global and expose it on via the @app.bundling.configure(...) |
Feature Spec
Wing now supports customizing the esbuild config for bundling inflight functions. This enables bundling functions with custom requirements, such as WebAsssembly modules or using custom esbuild plugins.
Use Cases
Implementation Notes
No response
Component
Compiler
Community Notes
The text was updated successfully, but these errors were encountered: