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 5acc437 commit 8b8447fCopy full SHA for 8b8447f
nodejs/packages/layer/src/loader.mjs
@@ -76,7 +76,15 @@ export function registerLoader() {
76
}
77
78
79
-if (_isHandlerAnESModule()) {
+function _isRuntimeUsingESMImports() {
80
+ const runtimeVersion = process.env.AWS_EXECUTION_ENV;
81
+ if (runtimeVersion === 'AWS_Lambda_nodejs24.x') {
82
+ return true;
83
+ }
84
+ return false;
85
+}
86
+
87
+if (_isHandlerAnESModule() || _isRuntimeUsingESMImports) {
88
/*
89
We could activate ESM loader hook of the "import-in-the-middle" library,
90
- by "--loader=import-in-the-middle/hook.mjs" Node CLI option, but "--loader" option has been deprecated
0 commit comments