Skip to content

Commit

Permalink
build: allow us to customise the base path
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshTheWanderer committed Jul 18, 2024
1 parent 231ec46 commit 2991907
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { StorybookConfig } from '@storybook/web-components-vite';

Check warning on line 1 in .storybook/main.ts

View workflow job for this annotation

GitHub Actions / lint

File ignored by default.

const base = process.env.BASE_PATH || '/';

const config: StorybookConfig = {
stories: [
'../components/**/*.mdx',
Expand All @@ -18,7 +20,13 @@ const config: StorybookConfig = {
},
docs: {
autodocs: true
}
},
async viteFinal(config) {
return {
...config,
base,
};
},
};

export default config;

0 comments on commit 2991907

Please sign in to comment.