Skip to content

Commit

Permalink
readd missing storybook settings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Nov 11, 2024
1 parent fcbda76 commit 87eea8c
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
import type { StorybookConfig } from "@storybook/react-webpack5";
import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin";

Expand All @@ -11,22 +11,16 @@ let stories: string[] = [];

if (includeDocs) {
stories = [
// TODO simplify imports for any pkgs /docs/**/*.stories.mdx
// "../docs/**/*.stories.mdx",
// "../packages/**/docs/**/*.mdx",
// "!../packages/**/docs/**/*.stories.mdx",
"../docs/**/!(*.stories).mdx",
"../docs/**/*.stories.tsx",
"../packages/**/docs/!(*.stories|IndexFileUsage).mdx",
"../packages/**/docs/*.mdx",
"../packages/**/docs/*.stories.tsx"
];
}

if (includeChromatic) {
stories = [
...stories,
// TODO remove chroma and simplify imports
// "../packages/components/**/tests/chromatic/**/*.chroma.jsx",
"../packages/components/**/tests/chromatic/**/*.stories.tsx"
];
}
Expand Down Expand Up @@ -99,15 +93,15 @@ const storybookConfig: StorybookConfig = {
]
};
config.optimization.minimize = false;
// TODO: set once in ESM
// config.plugins = [
// ...(config.plugins ?? []),
// configType !== "PRODUCTION" && new ReactRefreshWebpackPlugin({
// overlay: {
// sockIntegration: "whm"
// }
// })
// ].filter(Boolean);

config.plugins = [
...(config.plugins ?? []),
configType !== "PRODUCTION" && new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: "whm"
}
})
].filter(Boolean);

return config;
}
Expand Down

0 comments on commit 87eea8c

Please sign in to comment.