Skip to content

Commit 9def0fd

Browse files
committed
try to fix windows
1 parent 8ed31fe commit 9def0fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/kit/src/cli.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import path from 'path';
44
import colors from 'kleur';
55
import sade from 'sade';
66
import * as vite from 'vite';
7-
import { load_config } from './core/config/index.js';
87
import { networkInterfaces, release } from 'os';
8+
import { pathToFileURL } from 'url';
9+
import { load_config } from './core/config/index.js';
910
import { coalesce_to_error } from './utils/error.js';
1011

1112
/** @param {unknown} e */
@@ -289,7 +290,7 @@ export async function get_vite_config(svelte_config) {
289290
for (const file of ['vite.config.js', 'vite.config.mjs', 'vite.config.cjs']) {
290291
if (fs.existsSync(file)) {
291292
// TODO warn here if config.kit.vite was specified
292-
const module = await import(path.resolve(file));
293+
const module = await import(pathToFileURL(file).toString());
293294
return {
294295
...module.default,
295296
configFile: false

0 commit comments

Comments
 (0)