The default Storybook Babel config did not recognize the `public` keyword in our custom errors (e.g. `ExhaustivityCheckingError` and `RedactableError`). To fix this, we can use Storybook's V7 mode to supply a custom Babel config. This fixes the compilation error. See: https://storybook.js.org/docs/react/configure/babel
21 lines
498 B
TypeScript
21 lines
498 B
TypeScript
import type { StorybookConfig } from "@storybook/core-common";
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
addons: [
|
|
"@storybook/addon-links",
|
|
"@storybook/addon-essentials",
|
|
"@storybook/addon-interactions",
|
|
"./vscode-theme-addon/preset.ts",
|
|
],
|
|
framework: "@storybook/react",
|
|
core: {
|
|
builder: "@storybook/builder-webpack5",
|
|
},
|
|
features: {
|
|
babelModeV7: true,
|
|
},
|
|
};
|
|
|
|
module.exports = config;
|