Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25efeb1

Browse files
committed
chore: fix storybook deprecation warning
Removes a deprecated CLI option and uses main.js staticDirs instead. See: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#64-deprecations
1 parent ce49966 commit 25efeb1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

site/.storybook/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ module.exports = {
2626
plugins: ["@babel/plugin-proposal-class-properties"],
2727
}),
2828

29+
// Static files loaded by storybook, relative to this file.
30+
//
31+
// SEE: https://storybook.js.org/docs/react/configure/overview#using-storybook-api
32+
staticDirs: ["../static"],
33+
2934
// Storybook internally uses its own Webpack configuration instead of ours.
3035
//
3136
// SEE: https://storybook.js.org/docs/react/configure/webpack

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"playwright:install": "playwright install",
1717
"playwright:install-deps": "playwright install-deps",
1818
"playwright:test": "playwright test --config=e2e/playwright.config.ts",
19-
"storybook": "start-storybook -p 6006 -s ./static",
19+
"storybook": "start-storybook -p 6006",
2020
"storybook:build": "build-storybook",
2121
"test": "jest --selectProjects test",
2222
"test:coverage": "jest --selectProjects test --collectCoverage",

0 commit comments

Comments
 (0)