Commit ac0ecee
committed
Refactor build pipeline for performance and dev output reliability
Replace JS/CSS minifiers with esbuild to significantly reduce build
times while preserving outputs. Enable thread‑loader by default in dev
and prod with dynamically chosen workers. Keep filesystem cache enabled
and make compression configurable (favoring uncompressed for faster warm
builds on CPU‑bound machines). Scope the Webpack cache version to
output‑affecting dimensions for cross‑machine/CI reuse. Add
BUILD_PARALLEL to switch between parallel and sequential production
builds. Also enable dependency caching in GitHub Actions to speed up CI
runs.
Improve development behavior and outputs: keep watch mode alive on
initial compilation errors with deterministic exits via
BUILD_WATCH_ONCE, use style‑loader for faster CSS in dev, emit CSP‑safe
external source maps and copy them in dev to avoid 404s, and reduce
noisy CSS 404s by skipping only missing assets. Harden related env
parsing and consolidate logic to reduce duplication and improve
readability.
Packaging reliability: wait for the ZIP write stream to close before
proceeding to ensure archives are fully flushed on fast CI runners. No
breaking changes.
Results from a 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.1 parent 1eb1dc3 commit ac0ecee
File tree
5 files changed
+1829
-398
lines changed- .github/workflows
5 files changed
+1829
-398
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
20 | 39 | | |
21 | 40 | | |
22 | 41 | | |
| |||
0 commit comments