From 128fe8690e106489b14a2d4157c944726e6b18fc Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 6 Oct 2022 22:31:55 -0400 Subject: [PATCH] Vite: Set default `base` to `"./"` for subfolder deployments --- code/lib/builder-vite/src/vite-config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/lib/builder-vite/src/vite-config.ts b/code/lib/builder-vite/src/vite-config.ts index a973f01940fa..452bab0f3d7c 100644 --- a/code/lib/builder-vite/src/vite-config.ts +++ b/code/lib/builder-vite/src/vite-config.ts @@ -45,6 +45,8 @@ export async function commonConfig( configFile: false, cacheDir: 'node_modules/.vite-storybook', root: path.resolve(options.configDir, '..'), + // Allow storybook deployed as subfolder. See https://github.com/storybookjs/builder-vite/issues/238 + base: './', plugins: await pluginConfig(options), resolve: { preserveSymlinks: isPreservingSymlinks(),