Fix import.meta.env.BASE_URL not being corectly replaced when build in windows

This commit is contained in:
garronej 2024-10-26 22:07:29 +00:00
parent dc4eac1a04
commit 2b7f8a24a3

View File

@ -16,6 +16,7 @@ import {
} from "../bin/shared/buildContext";
import MagicString from "magic-string";
import { command as updateKcGenCommand } from "../bin/update-kc-gen";
import { replaceAll } from "../bin/tools/String.prototype.replaceAll";
export namespace keycloakify {
export type Params = BuildOptions & {
@ -130,6 +131,8 @@ export function keycloakify(params: keycloakify.Params) {
await updateKcGenCommand({ buildContext });
},
transform: (code, id) => {
id = replaceAll(id, "/", pathSep);
assert(command !== undefined);
assert(shouldGenerateSourcemap !== undefined);