Tag

mini-css-extract-plugin

0 views collected around this technical thread.

TikTok Frontend Technology Team
TikTok Frontend Technology Team
Oct 18, 2021 · Frontend Development

Eliminating Redundant base.js Chunk in Webpack 4 with a Custom Mini‑CSS‑Extract Plugin

This article explains why Webpack 4 generates an unnecessary base.js file when extracting common CSS with mini‑css‑extract‑plugin, analyses the underlying bootstrap dependency issue, and presents a custom plugin that adjusts the compilation graph to move the empty JS module, suppress the extra chunk, and correctly emit the shared base.css file.

Webpackbuild optimizationfrontend
0 likes · 24 min read
Eliminating Redundant base.js Chunk in Webpack 4 with a Custom Mini‑CSS‑Extract Plugin