From 6cb494150322d85f970a01452fd5f233818c0e67 Mon Sep 17 00:00:00 2001 From: Victor Trinh Date: Mon, 18 Nov 2024 19:38:18 -0500 Subject: [PATCH] Turn off terser things --- .storybook/main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.storybook/main.ts b/.storybook/main.ts index dfb85e6e5..8090c40dc 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -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"); @@ -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 ?? []),