Skip to content

Commit

Permalink
Turn off terser things
Browse files Browse the repository at this point in the history
  • Loading branch information
victortrinh2 committed Nov 19, 2024
1 parent 8e26c91 commit 6cb4941
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { Options as SwcOptions } from "@swc/core";
import { includeDocs, includeChromatic } from "./env.ts";
import { swcConfig as SwcBuildConfig } from "./swc.build.ts";
import { swcConfig as SwcDevConfig } from "./swc.dev.ts";
import TerserPlugin from "terser-webpack-plugin";

// We sometimes need to disable the lazyCompilation to properly run the test runner on stories
const isLazyCompilation = !(process.env.STORYBOOK_NO_LAZY === "true");
Expand Down Expand Up @@ -86,6 +87,13 @@ const storybookConfig: StorybookConfig = {
]
};
config.devtool = false;
config.optimization.minimizer = [
...(config.optimization.minimizer ?? []),
new TerserPlugin({
extractComments: false,
parallel: false
})
];

config.plugins = [
...(config.plugins ?? []),
Expand Down

0 comments on commit 6cb4941

Please sign in to comment.