Skip to content

Commit

Permalink
leave windows paths as-is
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 13, 2022
1 parent df6d568 commit 06de105
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/kit/src/core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ import { fileURLToPath } from 'url';

export const get_runtime_path = process.env.BUNDLED
? /** @param {import('types').ValidatedKitConfig} config */ (config) =>
posixify_path(path.join(config.outDir, 'runtime'))
: () => posixify_path(fileURLToPath(new URL('../runtime', import.meta.url)));

/** @param {string} str */
function posixify_path(str) {
const parsed = path.parse(str);
return `/${parsed.dir.slice(parsed.root.length).split(path.sep).join('/')}/${parsed.base}`;
}
path.join(config.outDir, 'runtime')
: () => fileURLToPath(new URL('../runtime', import.meta.url));

function noop() {}

Expand Down

0 comments on commit 06de105

Please sign in to comment.