File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
docs-svelte-kit/build-system Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11import esbuild from "esbuild"
22import path from "path"
33import fs from "fs"
4+ import { fileURLToPath } from "url"
45// const babelCore = require("@babel/core")
56// const t = require("@babel/types")
67
78const dirname = path . dirname (
8- new URL (
9+ fileURLToPath (
910 // @ts -expect-error -- Cannot change `module` option
1011 import . meta. url ,
11- ) . pathname ,
12+ ) ,
1213)
1314
1415build (
Original file line number Diff line number Diff line change 11import ghpagesAdapter from "svelte-adapter-ghpages"
22import path from "path"
33import fs from "fs"
4+ import { fileURLToPath } from "url"
45
56// eslint-disable-next-line no-undef -- There seems to be a package that uses `self`.
67if ( typeof self === "undefined" ) {
78 globalThis . self = globalThis
89}
910
10- const dirname = path . dirname ( new URL ( import . meta. url ) . pathname )
11+ const dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
1112
1213// This project can't be ESM yet, so hack it to get svelte-kit to work.
1314// A hack that treats files in the `.svelte-kit` directory as ESM.
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import svelteMdOption from "./docs-svelte-kit/tools/vite-plugin-svelte-md-option
66
77import "./docs-svelte-kit/build-system/build.mts"
88import type { UserConfig } from "vite"
9+ import { fileURLToPath } from "url"
910
1011const dirname = path . dirname (
11- new URL (
12+ fileURLToPath (
1213 // @ts -expect-error -- Cannot change `module` option
1314 import . meta. url ,
14- ) . pathname ,
15+ ) ,
1516)
1617
1718/** @type {import('vite').UserConfig } */
You can’t perform that action at this time.
0 commit comments