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

feat: ESM support #1379

Open
2 tasks
berenddeboer opened this issue Jul 19, 2023 · 1 comment
Open
2 tasks

feat: ESM support #1379

berenddeboer opened this issue Jul 19, 2023 · 1 comment
Labels
feature-request A feature should be added or improved. help wanted Extra attention is needed

Comments

@berenddeboer
Copy link

Description

Currently cdk-nag cannot be used for ESM modules. As I'm using SST as opposed to CDK I get all these __filename not supported errors.

Use Case

I'm using SST to build a lot of my CDK stacks in order to be more productive while developing and debugging lambdas.

Proposed Solution

This could be fixed in the library with a polyfill or by switching to ESM instead of commonjs.

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@berenddeboer berenddeboer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 19, 2023
@dontirun
Copy link
Collaborator

Thanks for reporting! I am in no means an expert in this area, but from my initial research it seems like switching to ESM is not an option as it would break CJS users (which I would assume is the vast majority of users).

I will have to do further research into an appropriate pollyfill for this use case. PRs and suggestions are welcome!

@dontirun dontirun removed the needs-triage This issue or PR still needs to be triaged. label Jul 20, 2023
@dontirun dontirun added the help wanted Extra attention is needed label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants