Skip to content

Commit f1cc83c

Browse files
committed
only require javascript files in node module loader patch
1 parent 2018756 commit f1cc83c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cloudflare/src/cli/build/patches/plugins/node-module-loader.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ async function getRule(buildOpts: BuildOptions) {
3636
pagesManifests = [];
3737
}
3838

39-
const files = pagesManifests.map((path) => normalizePath(path));
39+
const manifests = pagesManifests.map((path) => normalizePath(path));
40+
41+
const files = manifests.filter((file) => file.endsWith(".js"));
4042

4143
// Inline fs access and dynamic requires that are not supported by workerd.
4244
const fnBody = `

0 commit comments

Comments
 (0)