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 dev output reliability
Replace JS/CSS minifiers with esbuild to reduce build times while
preserving outputs.
Enable `thread-loader` by default in dev and production. Choose workers
dynamically (based on CPU cores) and allow overrides via environment
variables. Keep filesystem cache enabled and make cache compression
configurable, defaulting to uncompressed for faster warm builds on
CPU-bound machines. Add BUILD_PARALLEL toggle (default on) to switch
between parallel and sequential production variant builds. Ensure
watch-once dev builds exit cleanly by awaiting async output work.
Adopt `sass-embedded` for SASS processing. In development, use
`style-loader` to speed up CSS/SCSS compilation while keeping production
outputs unchanged. Maintain CSP-safe source maps for extension contexts;
copy external maps in dev to avoid 404s; suppress CSS 404 noise in dev
outputs by skipping only missing CSS.
Additionally, dependency caching has been added to the GitHub Actions
workflow to accelerate CI/CD runs.
Results on this DO VPS (2 cores, ~4 GiB RAM):
- Production first run (cold): ~44s (baseline ~105s)
- Production second run (warm): ~19s (baseline ~39s)
- Development first run: ~31s; second run: ~29s
Times vary by environment; numbers above are for this machine.
0 commit comments