Skip to content

Commit 803b6b4

Browse files
fix: root app path
1 parent 597403b commit 803b6b4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plugin-vite/src/plugins/server_entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function serverEntryPlugin(
3939
if (id !== `\0${modName}`) return;
4040

4141
let code = generateServerEntry({
42-
root,
42+
root: path.relative(serverOutDir, root),
4343
serverEntry: path.toFileUrl(serverEntry).href,
4444
snapshotSpecifier: "fresh:server-snapshot",
4545
});

src/dev/dev_build_cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ import { setBuildCache, ProdBuildCache, path } from "fresh/internal";
519519
import * as snapshot from "${options.snapshotSpecifier}";
520520
import { app } from "${options.serverEntry}";
521521
522-
const root = "";
522+
const root = path.join(import.meta.dirname, ${JSON.stringify(options.root)});
523523
setBuildCache(app, new ProdBuildCache(root, snapshot), "production");
524524
525525
export default {

0 commit comments

Comments
 (0)