Fix build on windows (#1138)
* Fix build on windows * More robust fix for paths in windows buildspull/1145/head
parent
68ead02975
commit
d9d3868d9e
|
@ -3,6 +3,7 @@ import * as esbuild from "esbuild";
|
||||||
import { compileManifests } from "./cmd/compile.ts";
|
import { compileManifests } from "./cmd/compile.ts";
|
||||||
import { builtinPlugNames } from "./plugs/builtin_plugs.ts";
|
import { builtinPlugNames } from "./plugs/builtin_plugs.ts";
|
||||||
import { parseArgs } from "@std/cli/parse-args";
|
import { parseArgs } from "@std/cli/parse-args";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
if (import.meta.main) {
|
if (import.meta.main) {
|
||||||
const args = parseArgs(Deno.args, {
|
const args = parseArgs(Deno.args, {
|
||||||
|
@ -27,7 +28,7 @@ if (import.meta.main) {
|
||||||
debug: args.debug,
|
debug: args.debug,
|
||||||
reload: args.reload,
|
reload: args.reload,
|
||||||
info: args.info,
|
info: args.info,
|
||||||
configPath: new URL("deno.json", import.meta.url).pathname,
|
configPath: fileURLToPath(new URL("deno.json", import.meta.url)),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
esbuild.stop();
|
esbuild.stop();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { copy } from "@std/fs";
|
import { copy } from "@std/fs";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
import sass from "denosass";
|
import sass from "denosass";
|
||||||
import { bundleFolder } from "./lib/asset_bundle/builder.ts";
|
import { bundleFolder } from "./lib/asset_bundle/builder.ts";
|
||||||
|
@ -105,7 +106,7 @@ async function buildCopyBundleAssets() {
|
||||||
jsxFragment: "Fragment",
|
jsxFragment: "Fragment",
|
||||||
jsxImportSource: "https://esm.sh/preact@10.23.1",
|
jsxImportSource: "https://esm.sh/preact@10.23.1",
|
||||||
plugins: denoPlugins({
|
plugins: denoPlugins({
|
||||||
configPath: new URL("./deno.json", import.meta.url).pathname,
|
configPath: fileURLToPath(new URL("./deno.json", import.meta.url)),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue