Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export function inlineEvalManifest(code: string, config: Config): string {
console.log("# inlineEvalManifest");
const manifestJss = globSync(
path.join(config.paths.standaloneAppDotNext, "**", "*_client-reference-manifest.js").replaceAll("\\", "/")
).map((file) => file.replaceAll("\\", "/").replace(`${config.paths.standaloneApp.replaceAll("\\", "/")}/`, ""));
).map((file) =>
file.replaceAll("\\", "/").replace(`${config.paths.standaloneApp.replaceAll("\\", "/")}/`, "")
);
return code.replace(
/function evalManifest\((.+?), .+?\) {/,
`$&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ export function patchReadFile(code: string, config: Config): string {
// Same as above, the next-server code loads the manifests with `readFileSync` and we want to avoid that
// (source: https://github.com/vercel/next.js/blob/15aeb92e/packages/next/src/server/load-manifest.ts#L34-L56)
// Note: we could/should probably just patch readFileSync here or something!
const manifestJsons = globSync(path.join(config.paths.standaloneAppDotNext, "**", "*-manifest.json").replaceAll("\\", "/")).map(
(file) => file.replaceAll("\\", "/").replace(config.paths.standaloneApp.replaceAll("\\", "/") + "/", "")
const manifestJsons = globSync(
path.join(config.paths.standaloneAppDotNext, "**", "*-manifest.json").replaceAll("\\", "/")
).map((file) =>
file.replaceAll("\\", "/").replace(config.paths.standaloneApp.replaceAll("\\", "/") + "/", "")
);
code = code.replace(
/function loadManifest\((.+?), .+?\) {/,
Expand Down