We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f039636 commit f4f72c8Copy full SHA for f4f72c8
src/frameworks/cdkFramework.ts
@@ -283,8 +283,9 @@ export class CdkFramework implements IFramework {
283
// for .mjs files, use js loader
284
const fileExtension = args.path.split('.').pop();
285
const loader: esbuild.Loader =
286
- fileExtension === 'mjs' ? 'js' : (fileExtension as esbuild.Loader);
287
-
+ (fileExtension === 'mjs' || fileExtension === 'cjs')
+ ? 'js'
288
+ : (fileExtension as esbuild.Loader);
289
// Inject code to get the file path of the Lambda function and CDK hierarchy
290
if (args.path.includes('aws-cdk-lib/aws-lambda/lib/function.')) {
291
const codeToFind =
0 commit comments