Skip to content

Commit ab0944b

Browse files
committed
chore: remove dynamic import handler flag from feature flags
1 parent c05f200 commit ab0944b

File tree

3 files changed

+17
-239
lines changed

3 files changed

+17
-239
lines changed

package-lock.json

Lines changed: 16 additions & 224 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/zip-it-and-ship-it/src/feature_flags.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export const defaultFlags = {
2929

3030
// Adds the `___netlify-telemetry.mjs` file to the function bundle.
3131
zisi_add_instrumentation_loader: true,
32-
33-
// Dynamically import the function handler.
34-
zisi_dynamic_import_function_handler: false,
3532
} as const
3633

3734
export type FeatureFlags = Partial<Record<keyof typeof defaultFlags, boolean>>

packages/zip-it-and-ship-it/src/runtimes/node/utils/entry_file.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,9 @@ const getEntryFileContents = (
5151
const importPath = `.${mainPath.startsWith('/') ? mainPath : `/${mainPath}`}`
5252

5353
if (runtimeAPIVersion === 2) {
54-
if (featureFlags.zisi_dynamic_import_function_handler) {
55-
return [
56-
`import * as bootstrap from './${BOOTSTRAP_FILE_NAME}'`,
57-
`export const handler = bootstrap.getLambdaHandler('${importPath}')`,
58-
].join(';')
59-
}
6054
return [
6155
`import * as bootstrap from './${BOOTSTRAP_FILE_NAME}'`,
62-
`import * as func from '${importPath}'`,
63-
64-
// See https://esbuild.github.io/content-types/#default-interop.
65-
'const funcModule = typeof func.default === "function" ? func : func.default',
66-
67-
`export const handler = bootstrap.getLambdaHandler(funcModule)`,
56+
`export const handler = bootstrap.getLambdaHandler('${importPath}')`,
6857
].join(';')
6958
}
7059

0 commit comments

Comments
 (0)