Skip to content

Commit 20f3edc

Browse files
authored
Merge pull request #12911 from CesiumGS/sandcastle-build-updates-windows
Use proper URLs for import statements
2 parents 97f606d + 2fcefac commit 20f3edc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/build.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { readFile, writeFile } from "node:fs/promises";
44
import { EOL } from "node:os";
55
import path from "node:path";
66
import { finished } from "node:stream/promises";
7-
import { fileURLToPath } from "node:url";
7+
import { fileURLToPath, pathToFileURL } from "node:url";
88

99
import esbuild from "esbuild";
1010
import { globby } from "globby";
@@ -664,7 +664,7 @@ const externalResolvePlugin = {
664664
export async function getSandcastleConfig() {
665665
const configPath = "packages/sandcastle/sandcastle.config.js";
666666
const configImportPath = path.join(projectRoot, configPath);
667-
const config = await import(configImportPath);
667+
const config = await import(pathToFileURL(configImportPath).href);
668668
const options = config.default;
669669
return {
670670
...options,
@@ -698,7 +698,9 @@ export async function buildSandcastleGallery(includeDevelopment) {
698698
__dirname,
699699
"../packages/sandcastle/scripts/buildGallery.js",
700700
);
701-
const { buildGalleryList } = await import(buildGalleryScriptPath);
701+
const { buildGalleryList } = await import(
702+
pathToFileURL(buildGalleryScriptPath).href
703+
);
702704

703705
await buildGalleryList({
704706
rootDirectory,

0 commit comments

Comments
 (0)