-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat: added Rolldown support to NodeJSFunction
#35788
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
base: main
Are you sure you want to change the base?
feat: added Rolldown support to NodeJSFunction
#35788
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
Rolldown support to NodeJSFunction
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
I disagree with this assessment. In |
|
Hey @mrgrain Thanks for taking the time to review the PR, I agree that there is some fragmentation still, however I think I can align them better for example, the fields that are currently fragmented are
Would aligning the keepNames and target fields better align with your expectations ? Thanks |
Issue # (if applicable)
Closes #35776, #32723
Reason for this change
Currently,
NodejsFunctiononly supports esbuild as a bundler for Lambda code. This PR adds support for Rolldown, a fast Rust-based bundler with an API compatible with Rollup, giving users an alternative bundling option while maintaining full backward compatibility.Description of changes
This PR introduces Rolldown as an alternative bundler for the
aws-lambda-nodejspackage without introducing any breaking changes.Key Changes:
Type Definitions (
lib/types.ts):Bundlerenum withESBUILD(default) andROLLDOWNoptionsBundlingOptionsinterface with:bundler?: Bundler- Allows users to select their preferred bundlerrolldownVersion?: string- Specify Rolldown version for Docker bundlingrolldownArgs?: { [key: string]: string | boolean }- Pass custom CLI arguments to RolldownkeepNames,metafile,sourcesContent,targetare esbuild-only)Bundling Logic (
lib/bundling.ts):ROLLDOWN_MAJOR_VERSION = '1',ROLLDOWN_DEFAULT_VERSION = '1.0.0-beta.44')createRolldownCommand()method to generate Rolldown CLI commandscreateBundlingCommand()to conditionally use esbuild or RolldownDocker Support (
lib/Dockerfile):Documentation (
README.md):Testing:
test/bundling-rolldown.test.tswith comprehensive unit tests covering:test/integ.rolldown.tswith multiple test casestest/integ-handlers/rolldown-handler.tsDesign Decisions:
Alternatives Considered:
Describe any new or updated permissions being added
No new or updated IAM permissions are required for this change.
Description of how you validated changes
Unit Tests:
test/bundling-rolldown.test.ts(11 test cases)Integration Tests:
test/integ.rolldown.tswith 4 integration test scenarios:Manual Testing:
Checklist