Skip to content

Commit

Permalink
fix: storybook build 45
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Aug 29, 2023
1 parent c2beafa commit c75ed03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
12 changes: 0 additions & 12 deletions packages/app/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ const config: StorybookConfig = {
name: '@storybook/nextjs',
options: {},
},
webpackFinal: async (config, { configType }) => {
if (configType === 'PRODUCTION') {
return {
...config,
output: {
...config.output,
publicPath: '/storybook/',
},
};
}
return config;
},
};

export default config;
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"scripts": {
"build": "next build",
"build:storybook": "pnpm ts:check && storybook build -o storybook && mv ./storybook ./public",
"build:storybook": "./scripts/build-storybook.sh",
"build:preview": "run-s build:storybook build",
"dev": "next dev",
"dev:storybook": "storybook dev -p 6006",
"lint": "next lint",
"start": "next start",
"storybook": "storybook dev -p 6006",
"test": "jest --verbose",
"ts:check": "tsc --noEmit"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/app/scripts/build-storybook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pnpm ts:check
pnpm storybook build -o storybook
rm -rf ./public/storybook
mv ./storybook ./public

0 comments on commit c75ed03

Please sign in to comment.