Commit b48a0af
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 both dev and prod with workers
chosen dynamically. Keep filesystem cache enabled and make cache
compression configurable (favoring uncompressed for faster warm builds
on CPU‑bound machines). Add BUILD_PARALLEL to switch between parallel
and sequential production variant builds.
Improve development outputs: ensure watch‑once builds exit cleanly,
use style-loader for faster CSS in dev, keep CSP‑safe external source
maps and copy them in dev to avoid 404s, and suppress noisy CSS 404s
by skipping only missing assets.
Maintainability: consolidate dev CSS placeholder handling and
centralize cache‑compression option parsing to reduce duplication and
improve readability. Align the Sass fallback error message with the
repository string style. No behavioral changes.
Additionally, enable dependency caching in GitHub Actions to speed up
CI 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.1 parent edaf40d commit b48a0af
File tree
5 files changed
+1802
-398
lines changed- .github
- workflows
5 files changed
+1802
-398
lines changed| 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 | | |
| |||
| 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 | | |
| |||
0 commit comments