Skip to content

Commit

Permalink
Fix build on windows (#1138)
Browse files Browse the repository at this point in the history
* Fix build on windows

* More robust fix for paths in windows builds
  • Loading branch information
p-weston authored Nov 7, 2024
1 parent 68ead02 commit d9d3868
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build_plugs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as esbuild from "esbuild";
import { compileManifests } from "./cmd/compile.ts";
import { builtinPlugNames } from "./plugs/builtin_plugs.ts";
import { parseArgs } from "@std/cli/parse-args";
import { fileURLToPath } from "node:url";

if (import.meta.main) {
const args = parseArgs(Deno.args, {
Expand All @@ -27,7 +28,7 @@ if (import.meta.main) {
debug: args.debug,
reload: args.reload,
info: args.info,
configPath: new URL("deno.json", import.meta.url).pathname,
configPath: fileURLToPath(new URL("deno.json", import.meta.url)),
},
);
esbuild.stop();
Expand Down
3 changes: 2 additions & 1 deletion build_web.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { copy } from "@std/fs";
import { fileURLToPath } from "node:url";

import sass from "denosass";
import { bundleFolder } from "./lib/asset_bundle/builder.ts";
Expand Down Expand Up @@ -105,7 +106,7 @@ async function buildCopyBundleAssets() {
jsxFragment: "Fragment",
jsxImportSource: "https://esm.sh/[email protected]",
plugins: denoPlugins({
configPath: new URL("./deno.json", import.meta.url).pathname,
configPath: fileURLToPath(new URL("./deno.json", import.meta.url)),
}),
});

Expand Down

0 comments on commit d9d3868

Please sign in to comment.