diff --git a/code/lib/builder-vite/src/vite-config.ts b/code/lib/builder-vite/src/vite-config.ts index a3c516de5e54..323cef63ab6f 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/.cache/.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(),