Skip to content

Commit

Permalink
readd plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Nov 12, 2024
1 parent 9704ff9 commit 20c9429
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 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";
import type { Options } from "@storybook/types";
Expand Down Expand Up @@ -74,7 +74,7 @@ const storybookConfig: StorybookConfig = {
swc: (_: SwcOptions, { configType }: Options): SwcOptions => {
return configType === "PRODUCTION" ? SwcBuildConfig : SwcDevConfig;
},
webpackFinal(config/*, { configType }*/) {
webpackFinal(config, { configType }) {
config.resolve = {
...config.resolve,
plugins: [
Expand All @@ -88,14 +88,14 @@ const storybookConfig: StorybookConfig = {
config.devtool = false;
config.optimization.minimize = false;

// 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 20c9429

Please sign in to comment.