Skip to content

Commit c60ea89

Browse files
committed
ugh windows
1 parent 7694a15 commit c60ea89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/kit/src/core/dev/plugin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { get_mime_lookup, get_runtime_path, resolve_entry } from '../utils.js';
1212
import { coalesce_to_error } from '../../utils/error.js';
1313
import { load_template } from '../config/index.js';
1414
import { sequence } from '../../hooks.js';
15+
import { posixify } from '../../utils/filesystem.js';
1516

1617
/**
1718
* @param {import('types').ValidatedConfig} config
@@ -235,12 +236,12 @@ export async function create_plugin(config, cwd) {
235236
// can get loaded twice via different URLs, which causes failures. Might
236237
// require changes to Vite to fix
237238
const { default: root } = await vite.ssrLoadModule(
238-
'/' + path.relative(cwd, `${config.kit.outDir}/generated/root.svelte`)
239+
`/${posixify(path.relative(cwd, `${config.kit.outDir}/generated/root.svelte`))}`
239240
);
240241

241242
const paths = await vite.ssrLoadModule(
242243
process.env.BUNDLED
243-
? '/' + path.relative(cwd, `${config.kit.outDir}/runtime/paths.js`)
244+
? `/${posixify(path.relative(cwd, `${config.kit.outDir}/runtime/paths.js`))}`
244245
: `/@fs${runtime}/paths.js`
245246
);
246247

0 commit comments

Comments
 (0)