this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: support Next 14 experimental.serverComponentsExternalPackages (#738)

authored by

Magnus and committed by
GitHub
b911c3e7 9ed8d8aa

+8 -1
+5
.changeset/light-llamas-cut.md
··· 1 + --- 2 + "@opennextjs/cloudflare": patch 3 + --- 4 + 5 + fix: support Next 14 experimental.serverComponentsExternalPackages
+3 -1
packages/cloudflare/src/cli/build/utils/workerd.ts
··· 81 81 82 82 // Copy full external packages when they use "workerd" build condition 83 83 const nextConfig = loadConfig(path.join(options.appBuildOutputPath, ".next")); 84 - const externalPackages = nextConfig.serverExternalPackages ?? []; 84 + const externalPackages = 85 + // @ts-expect-error In Next 14 its under experimental.serverComponentsExternalPackages 86 + nextConfig.serverExternalPackages ?? nextConfig.experimental.serverComponentsExternalPackages ?? []; 85 87 for (const [src, dst] of nodePackages.entries()) { 86 88 try { 87 89 const pkgJson = JSON.parse(await fs.readFile(path.join(src, "package.json"), "utf8"));