Skip to content

Commit a78799b

Browse files
committed
fixup! handle feedback
1 parent 60c7f62 commit a78799b

File tree

3 files changed

+10
-270
lines changed

3 files changed

+10
-270
lines changed

packages/cloudflare/src/cli/build/patches/ast/patch-vercel-og-library.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function patchVercelOgLibrary(buildOpts: BuildOptions) {
5858
}
5959

6060
// Change node imports for the library to edge imports.
61-
// This is only useful when tubopack is not used to bundle the function.
61+
// This is only useful when turbopack is not used to bundle the function.
6262
const routeFilePath = traceInfoPath.replace(appBuildOutputPath, packagePath).replace(".nft.json", "");
6363

6464
const node = parseFile(routeFilePath);

packages/cloudflare/src/cli/build/patches/plugins/turbopack.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ ${chunks
6868
// We patch it to:
6969
// - add the explicit path so that the file is inlined by wrangler
7070
// - use the edge version of the module instead of the node version.
71+
//
72+
// Modules that are not inlined (no added to the switch), would generate an error similar to:
73+
// Failed to load external module path/to/module: Error: No such module "path/to/module"
7174
const inlineExternalImportRule = `
7275
rule:
7376
pattern: "$RAW = await import($ID)"

0 commit comments

Comments
 (0)