From 25efeb1826c8120a150d57837a63a8a3cae1628e Mon Sep 17 00:00:00 2001 From: G r e y Date: Wed, 13 Apr 2022 03:25:26 +0000 Subject: [PATCH 1/2] 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 --- site/.storybook/main.js | 5 +++++ site/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/site/.storybook/main.js b/site/.storybook/main.js index de93a2695ebba..292ac709f93f4 100644 --- a/site/.storybook/main.js +++ b/site/.storybook/main.js @@ -26,6 +26,11 @@ module.exports = { plugins: ["@babel/plugin-proposal-class-properties"], }), + // 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 diff --git a/site/package.json b/site/package.json index eb1cf82ef96d0..d1c5cec680e33 100644 --- a/site/package.json +++ b/site/package.json @@ -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", From ffeddc3f832aa56c4b2df2ab4a39a3753439e7af Mon Sep 17 00:00:00 2001 From: G r e y Date: Wed, 13 Apr 2022 03:33:14 +0000 Subject: [PATCH 2/2] chore: fix storybook babel warning Resolves: #533 --- site/.storybook/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/.storybook/main.js b/site/.storybook/main.js index 292ac709f93f4..9547939673c16 100644 --- a/site/.storybook/main.js +++ b/site/.storybook/main.js @@ -23,7 +23,7 @@ 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.