You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor build pipeline for performance and config
Adopt esbuild minification, enable thread-loader by default,
and support parallel production builds while keeping cache
compression configurable.
Consolidate boolean env parsing, cache the Sass
implementation per process, and tune worker defaults for
more predictable build behavior.
- Default: `0` (no compression) for faster warm builds on CPU-bound SSD machines
29
+
- Options: `0|false|none`, `gzip` (or `brotli` if explicitly desired)
30
+
- Affects only `.cache/webpack` size/speed; does not change final artifacts
31
+
- BUILD_WATCH_ONCE (dev): When set, `npm run dev` runs a single build and exits (useful for timing)
32
+
- BUILD_POOL_TIMEOUT: Override thread-loader production pool timeout (ms)
33
+
- Default: `2000`. Increase if workers recycle too aggressively on slow machines/CI
34
+
- Source maps (dev): Dev builds emit external `.map` files next to JS bundles for CSP-safe debugging; production builds disable source maps
35
+
- Symlinks: Webpack uses `resolve.symlinks: false` to improve performance and ensure consistent module identity; if you rely on `npm link`/pnpm workspaces, temporarily enable symlink resolution while developing linked packages
36
+
37
+
Performance defaults: esbuild handles JS/CSS minification. In development, CSS is injected via style-loader; in production, CSS is extracted via MiniCssExtractPlugin. Thread-loader is enabled by default in both dev and prod.
38
+
20
39
### Build Output Structure
21
40
22
41
Production build creates multiple variants in `build/` directory:
0 commit comments