Skip to content

Commit fee6398

Browse files
committed
fix: set storybook base path via viteFinal, remove invalid --base-path flag
1 parent a179dfc commit fee6398

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: npm ci
3333

3434
- name: Build Storybook
35-
run: npx storybook build --base-path /ui-kit --output-dir ./storybook-static
35+
run: npx storybook build --output-dir ./storybook-static
3636

3737
- uses: actions/configure-pages@v5
3838

.storybook/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { StorybookConfig } from "@storybook/react-vite";
2+
import type { InlineConfig } from "vite";
23

34
const config: StorybookConfig = {
45
stories: [
@@ -14,6 +15,10 @@ const config: StorybookConfig = {
1415
docs: {
1516
defaultName: "Docs",
1617
},
18+
viteFinal: (config: InlineConfig) => {
19+
config.base = "/ui-kit/";
20+
return config;
21+
},
1722
};
1823

1924
export default config;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build-storybook": "storybook build",
1010
"typecheck": "tsc --noEmit",
1111
"build": "vite build",
12-
"predeploy": "storybook build --base-path /ui-kit --output-dir ./storybook-static",
12+
"predeploy": "storybook build --output-dir ./storybook-static",
1313
"deploy": "gh-pages -d storybook-static"
1414
},
1515
"devDependencies": {

0 commit comments

Comments
 (0)