feat: minification serveur à la volée (terser + fallback Bun) et cache immutable
- import terser/Bun.Transpiler (fallback si terser indisponible) - minifySrc(): CSS via regex, JS via terser.minify (compress+mangle) sinon source - buildFileCache asynchrone, etag stable sha1(content), cache de minification hashé - Cache-Control: html no-store, assets ?v= immutable 1 an, sinon must-revalidate
This commit is contained in:
parent
02125e473d
commit
bf9b3ccf69
3 changed files with 79 additions and 11 deletions
|
|
@ -17,6 +17,7 @@
|
|||
"dependencies": {
|
||||
"marked": "^18.0.9",
|
||||
"sharp": "^0.35.3",
|
||||
"terser": "^5.51.2",
|
||||
"wordpress-honeypot": "^1.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue