Commit 4126a4f
committed
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.1 parent 3768a06 commit 4126a4f
File tree
5 files changed
+1783
-395
lines changed- .github
- workflows
5 files changed
+1783
-395
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 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
| |||
0 commit comments