Skip to content

Commit c8dc795

Browse files
committed
fix minimizer
1 parent a06b194 commit c8dc795

File tree

1 file changed

+5
-2
lines changed
  • packages/docusaurus/src/webpack

1 file changed

+5
-2
lines changed

packages/docusaurus/src/webpack/base.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export async function createBaseConfig({
7777
siteMetadata,
7878
plugins,
7979
} = props;
80+
const {currentBundler} = configureWebpackUtils;
8081
const totalPages = routesPaths.length;
8182
const isProd = process.env.NODE_ENV === 'production';
8283
const minimizeEnabled = minify && isProd;
@@ -89,7 +90,7 @@ export async function createBaseConfig({
8990
const themeAliases = await loadThemeAliases({siteDir, plugins});
9091

9192
const CSSExtractPlugin = await getCSSExtractPlugin({
92-
currentBundler: configureWebpackUtils.currentBundler,
93+
currentBundler,
9394
});
9495

9596
return {
@@ -178,7 +179,9 @@ export async function createBaseConfig({
178179
// Only minimize client bundle in production because server bundle is only
179180
// used for static site generation
180181
minimize: minimizeEnabled,
181-
minimizer: minimizeEnabled ? await getMinimizers({faster}) : undefined,
182+
minimizer: minimizeEnabled
183+
? await getMinimizers({faster, currentBundler})
184+
: undefined,
182185
splitChunks: isServer
183186
? false
184187
: {

0 commit comments

Comments
 (0)