Commit 769e928
perf: load core CSS/JS on demand instead of globally on front end
Move useStyle('cwmcore') and useScript('cwmcorejs') out of api.php
for front-end requests. Views and modules already load these assets
when needed via Cwmlisting::getFluidListing() and module Dispatchers.
This eliminates render-blocking CSS (cwmcore.min.css, ~4KB) and
unnecessary JS (cwmcorejs, ~8KB) from pages where Proclaim modules
don't need them. Admin pages continue to load them globally.
Lighthouse: estimated 150ms savings from unblocking initial render.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6ef1ea2 commit 769e928
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | | - | |
99 | | - | |
100 | 99 | | |
101 | | - | |
102 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
0 commit comments