From 2991907e2b7d876273fede8a0bed18bc416c1e5c Mon Sep 17 00:00:00 2001 From: Josh Rose Date: Thu, 18 Jul 2024 11:10:10 +0200 Subject: [PATCH] build: allow us to customise the base path --- .storybook/main.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index 67cafcb..448fa33 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,5 +1,7 @@ import type { StorybookConfig } from '@storybook/web-components-vite'; +const base = process.env.BASE_PATH || '/'; + const config: StorybookConfig = { stories: [ '../components/**/*.mdx', @@ -18,7 +20,13 @@ const config: StorybookConfig = { }, docs: { autodocs: true - } + }, + async viteFinal(config) { + return { + ...config, + base, + }; + }, }; export default config;