File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/cloudflare/src/cli/build/patches/plugins Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,15 @@ async function getRule(buildOpts: BuildOptions) {
3333 pagesManifests = Object . values ( JSON . parse ( await readFile ( pagesManifestFile , "utf-8" ) ) ) ;
3434 } catch {
3535 // The file does not exist
36- pagesManifests = [ ] ;
3736 }
3837
39- const manifests = pagesManifests . map ( ( path ) => normalizePath ( path ) ) ;
40-
41- const files = manifests . filter ( ( file ) => file . endsWith ( ".js" ) ) ;
38+ const files = pagesManifests . filter ( ( file ) => file . endsWith ( ".js" ) ) . map ( normalizePath ) ;
4239
4340 // Inline fs access and dynamic requires that are not supported by workerd.
4441 const fnBody = `
4542${ files
4643 . map (
47- ( file ) => `if (id .endsWith("${ file } ")) {
44+ ( file ) => `if ($ID .endsWith("${ file } ")) {
4845 return require(${ JSON . stringify ( join ( serverDir , file ) ) } );
4946}`
5047 )
You can’t perform that action at this time.
0 commit comments