diff --git a/.gitignore b/.gitignore index ee94e75..5219fad 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,7 @@ node_modules dist # Misc -.DS_Store \ No newline at end of file +.DS_Store + +# Storybook build output +storybook-static 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;