Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ If you have a new feature idea, please create and issue.
- [Roger Chi](https://rogerchi.com/)
- [Sebastian / avocadomaster](https://github.com/avocadomaster)
- [Sebastian Bille](https://blog.sebastianbille.com)
- [Spotchi](https://github.com/Spotchi)
- ⭐ Your name here for notable code or documentation contributions or sample projects submitted with a bug report that resulted in tool improvement.

## Disclaimer
Expand Down
5 changes: 3 additions & 2 deletions src/frameworks/cdkFramework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ export class CdkFramework implements IFramework {
// for .mjs files, use js loader
const fileExtension = args.path.split('.').pop();
const loader: esbuild.Loader =
fileExtension === 'mjs' ? 'js' : (fileExtension as esbuild.Loader);

fileExtension === 'mjs' || fileExtension === 'cjs'
? 'js'
: (fileExtension as esbuild.Loader);
// Inject code to get the file path of the Lambda function and CDK hierarchy
if (args.path.includes('aws-cdk-lib/aws-lambda/lib/function.')) {
const codeToFind =
Expand Down
Loading