Skip to content

Commit

Permalink
this might work?
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 16, 2022
1 parent ad7aaaa commit d88f857
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/kit/src/vite/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ export async function dev(vite, vite_config, svelte_config, illegal_imports) {

remove_static_middlewares(vite.middlewares);

const runtime_base = path.relative('.', runtime_directory);
const runtime_base = runtime_directory.startsWith(process.cwd())
? `/${path.relative('.', runtime_directory)}`
: `/@fs${
// Windows/Linux separation - Windows starts with a drive letter, we need a / in front there
runtime_directory.startsWith('/') ? '' : '/'
}${runtime_directory}`;

const { set_private_env } = await vite.ssrLoadModule(`${runtime_base}/env-private.js`);
const { set_public_env } = await vite.ssrLoadModule(`${runtime_base}/env-public.js`);
Expand Down

0 comments on commit d88f857

Please sign in to comment.