File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/cloudflare/src/cli/build/patches/plugins Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { getCrossPlatformPathRegex } from "@opennextjs/aws/utils/regex.js";
77import { normalizePath } from "../../utils/normalize-path.js" ;
88import { patchCode , type RuleConfig } from "../ast/util.js" ;
99import type { ContentUpdater } from "./content-updater.js" ;
10+ import { posix , sep } from "node:path" ;
1011
1112export function inlineNodeModuleLoader ( updater : ContentUpdater , buildOpts : BuildOptions ) {
1213 return updater . updateContent (
@@ -41,7 +42,7 @@ async function getRule(buildOpts: BuildOptions) {
4142 const fnBody = `
4243${ files
4344 . map (
44- ( file ) => `if ($ID.endsWith(" ${ file } " )) {
45+ ( file ) => `if ($ID.replaceAll( ${ JSON . stringify ( sep ) } , ${ JSON . stringify ( posix . sep ) } ). endsWith(${ JSON . stringify ( file ) } )) {
4546 return require(${ JSON . stringify ( join ( serverDir , file ) ) } );
4647}`
4748 )
You can’t perform that action at this time.
0 commit comments