diff --git a/src/core/create_manifests.ts b/src/core/create_manifests.ts index 4c0b2a9..1e1a09a 100644 --- a/src/core/create_manifests.ts +++ b/src/core/create_manifests.ts @@ -204,9 +204,12 @@ function generate_server( error };`.replace(/^\t\t/gm, '').trim(); + const build_dir = path.relative(process.cwd(), locations.dest()); + const src_dir = path.relative(process.cwd(), locations.src()); + return `// This file is generated by Sapper — do not edit it!\n` + template - .replace('__BUILD__DIR__', JSON.stringify(locations.dest())) - .replace('__SRC__DIR__', JSON.stringify(locations.src())) + .replace('__BUILD__DIR__', JSON.stringify(build_dir)) + .replace('__SRC__DIR__', JSON.stringify(src_dir)) .replace('__DEV__', dev() ? 'true' : 'false') .replace(/const manifest = __MANIFEST__;/, code); }