concept-collection / numbl-image-filter
Use a relative base so the build works at any mount point
owner <owner@noreply.vault1.fly.dev> committed commit 457048ff147e parent c2ebaca Browse files
1 changed file+3−4
vite.config.tsmodified+3−4View file
@@ -3,10 +3,9 @@ import react from "@vitejs/plugin-react";
33
44 // https://vite.dev/config/
55 export default defineConfig(({ mode }) => ({
6- // Served from a project subpath on GitHub Pages
7- // (https://magland.github.io/numbl-image-filter/). The deploy workflow builds
8- // with `--mode pages`; local dev/build stays at root.
9- base: mode === "pages" ? "/numbl-image-filter/" : "/",
6+ // A relative base under `--mode pages`, so the build works wherever it is
7+ // mounted (a Pages project subpath, or a site root); local dev stays at root.
8+ base: mode === "pages" ? "./" : "/",
109 plugins: [react()],
1110 // numbl is built primarily for Node; a few code paths reference `process`.
1211 // The reachable ones are guarded with `typeof process !== "undefined"`, but