More storybook updates for github pages

This commit is contained in:
adilallo
2025-08-21 11:33:36 -06:00
parent 318ae5a32f
commit 12ad54167b
6 changed files with 102 additions and 4 deletions
+4
View File
@@ -16,7 +16,11 @@ const config = {
options: {},
},
staticDirs: ["../public"],
managerHead: (head) => `${head}<base href="/communityrulestorybook/">`,
previewHead: (head) => `${head}<base href="/communityrulestorybook/">`,
async viteFinal(cfg) {
// IMPORTANT: Set base path for GitHub Pages sub-path hosting
cfg.base = "/communityrulestorybook/";
// Ensure esbuild treats .js as JSX during dep pre-bundling
cfg.optimizeDeps ??= {};
cfg.optimizeDeps.esbuildOptions ??= {};