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

aws-lambda-nodejs: introduce NodejsFunctionV2 to support Rolldown as a bundler #32723

Open
2 tasks
garysassano opened this issue Jan 3, 2025 · 2 comments
Open
2 tasks
Labels
@aws-cdk/aws-lambda-nodejs effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p3

Comments

@garysassano
Copy link

Describe the feature

Rolldown is a Rust-based bundler that aims to provide API compatibility with Rollup and performance parity with esbuild.

On December 25, 2024, Rolldown v1.0.0-beta.1 was officially released, marking a major milestone in its development. With its modern design and growing adoption, Rolldown is poised to become the next standard for bundling and is already set to replace both esbuild and Rollup in Vite.

Use Case

In light of these advancements, adding support for Rolldown in the aws-lambda-nodejs module would provide future-proofing with a next-generation bundler aligned with modern frameworks, as well as improved performance through smaller bundle sizes and faster builds enabled by Rust-based optimizations.

Proposed Solution

Monitor Rolldown's stability as it moves toward a production-ready release. Once stable, implement support for it with a new NodejsFunctionV2 construct.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.173.4

Environment details (OS name and version, etc.)

Ubuntu 24.04.1

@garysassano garysassano added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 3, 2025
@ashishdhingra ashishdhingra self-assigned this Jan 3, 2025
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 3, 2025
@ashishdhingra
Copy link
Contributor

Per https://rolldown.rs/about, Rolldown can also be directly usable as a standalone bundler. Bundling for NodeJs Lambda function could be refactored to use an interface to specify bundler as a property. It needs to be investigated if Rolldown could support current bundling options (such as excluding files, etc.; refer here).

@ashishdhingra ashishdhingra added effort/large Large work item – several weeks of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jan 3, 2025
@ashishdhingra ashishdhingra removed their assignment Jan 3, 2025
@garysassano
Copy link
Author

The current construct has issues with Docker bundling (see #19230) and other stuff. I think it could be beneficial to take the opportunity to move away from it and start fresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

2 participants