-
Notifications
You must be signed in to change notification settings - Fork 146
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
Feature request: build as esmodule #521
Comments
Thanks @flochaz for opening this issue! If I look at the AWS SDK v3, this is how @trivikr and the team handles it:
Full example for the DynamoDB client: Personally, I think that right now supporting both CommonJS and ES6 is not a high priority, but a nice to have that would definitely improve the dev experience. I would like to see a small proof of concept but I don't think this is something we should prioritize for the production ready milestone. |
If we want, at least for now, make sure that the three core utilities available ( Given that our main focus at the moment is to bring these utils to a production ready status. Marking this issue as |
I'm only using |
Recap of the status and actions required before being able to move forward with this: While we acknowledge that there's an option to independently support ESM on some utilities while leaving others only with CJS support, we are still keen in dedicating some effort in investigating ways to bring ESM support for all utilities. We believe that doing so would result in a less confusing developer experience for users, since they wouldn't have to check which utility supports what. At the moment, before starting to work on the feature we need to resolve the following topics:
The resolver for this issue will have to primarily investigate the scope of the changes and propose options to move forward along with considerations on the tradeoffs for each option. Ideally, each solution/option should also propose high-level examples of where the changes would be (i.e. If anyone is willing to take this on, please leave a comment below before starting to work on it. |
All the modules have now been converted to esm + cjs on the In the next days I'll work on creating an alpha release channel so that you can start testing the new version and let us know if there's any issue with the way things are built. Once again, a huge thank you to everyone who interacted with the issue and helped push this forward - especially @shdq and @antstanley. |
|
Description of the feature request
Problem statement
Powertools is packaged as commonJS which does not give the capability to javascript developers to use esmodule import syntax and feature.
Summary of the feature
Now that AWS Lambda support es module import it might worth generating esmodule.
Code examples
Before:
After:
Benefits for you and the wider AWS community
See https://aws.amazon.com/blogs/compute/using-node-js-es-modules-and-top-level-await-in-aws-lambda/ for more details ...
Additional context
slack channel discussion
Related issues, RFCs
#490
The text was updated successfully, but these errors were encountered: