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
This commit is contained in:
G r e y
2022-04-13 12:03:46 -04:00
committed by GitHub
parent 0536a140ed
commit 5ecc8236b8
2 changed files with 7 additions and 2 deletions

View File

@ -23,9 +23,14 @@ module.exports = {
// SEE: https://storybook.js.org/docs/react/configure/babel
babel: async (options) => ({
...options,
plugins: ["@babel/plugin-proposal-class-properties"],
plugins: [["@babel/plugin-proposal-class-properties", { loose: true }]],
}),
// Static files loaded by storybook, relative to this file.
//
// SEE: https://storybook.js.org/docs/react/configure/overview#using-storybook-api
staticDirs: ["../static"],
// Storybook internally uses its own Webpack configuration instead of ours.
//
// SEE: https://storybook.js.org/docs/react/configure/webpack

View File

@ -16,7 +16,7 @@
"playwright:install": "playwright install",
"playwright:install-deps": "playwright install-deps",
"playwright:test": "playwright test --config=e2e/playwright.config.ts",
"storybook": "start-storybook -p 6006 -s ./static",
"storybook": "start-storybook -p 6006",
"storybook:build": "build-storybook",
"test": "jest --selectProjects test",
"test:coverage": "jest --selectProjects test --collectCoverage",