Skip to content

Commit 5ecc823

Browse files
authored
chore: fix storybook warnings (#989)
* 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 * chore: fix storybook babel warning Resolves: #533
1 parent 0536a14 commit 5ecc823

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

site/.storybook/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ module.exports = {
2323
// SEE: https://storybook.js.org/docs/react/configure/babel
2424
babel: async (options) => ({
2525
...options,
26-
plugins: ["@babel/plugin-proposal-class-properties"],
26+
plugins: [["@babel/plugin-proposal-class-properties", { loose: true }]],
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy