File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
packages/zip-it-and-ship-it/src Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,6 @@ export const defaultFlags = {
26
26
27
27
// Adds the `___netlify-telemetry.mjs` file to the function bundle.
28
28
zisi_add_instrumentation_loader : true ,
29
-
30
- // Dynamically import the function handler.
31
- zisi_dynamic_import_function_handler_entry_point : false ,
32
29
} as const
33
30
34
31
export type FeatureFlags = Partial < Record < keyof typeof defaultFlags , boolean > >
Original file line number Diff line number Diff line change @@ -45,26 +45,15 @@ export const kebabCase = (input: string): string =>
45
45
const getEntryFileContents = (
46
46
mainPath : string ,
47
47
moduleFormat : string ,
48
- featureFlags : FeatureFlags ,
48
+ _featureFlags : FeatureFlags ,
49
49
runtimeAPIVersion : number ,
50
50
) => {
51
51
const importPath = `.${ mainPath . startsWith ( '/' ) ? mainPath : `/${ mainPath } ` } `
52
52
53
53
if ( runtimeAPIVersion === 2 ) {
54
- if ( featureFlags . zisi_dynamic_import_function_handler_entry_point ) {
55
- return [
56
- `import * as bootstrap from './${ BOOTSTRAP_FILE_NAME } '` ,
57
- `export const handler = bootstrap.getLambdaHandler('${ importPath } ')` ,
58
- ] . join ( ';' )
59
- }
60
54
return [
61
55
`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 } ')` ,
68
57
] . join ( ';' )
69
58
}
70
59
You can’t perform that action at this time.
0 commit comments