Skip to content

Commit

Permalink
Replace unsupported flag -s wiht staticDirs
Browse files Browse the repository at this point in the history
In 6.4 Storybook replaced the --static-dir CLI flag with the staticDirs
field in .storybook/main.js. Note that the CLI directories are relative
to the current working directory, whereas the staticDirs are relative to
the location of main.js.

See #deprecated---static-dir-cli-flag on
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md
  • Loading branch information
WULCAN committed Jun 26, 2024
1 parent f1f6ad8 commit a561102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
staticDirs: ['../src'],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],

addons: [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"playwright": "cross-env NODE_ENV=production playwright test",
"playwright:skipbuild": "cross-env NODE_ENV=production SKIP_BUILD=1 playwright test",
"playwright:ci": "cross-env NODE_ENV=production playwright test",
"storybook": "storybook dev -p 6006 -s ./src",
"storybook": "storybook dev -p 6006",
"make-yaml": "ts-node src/tools/make-yaml.ts",
"build-storybook": "storybook build"
},
Expand Down

0 comments on commit a561102

Please sign in to comment.