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:
riricdev 2026-09-06 14:48:11 +02:00
commit e0811492fa
3 changed files with 79 additions and 11 deletions

View file

@ -17,6 +17,7 @@
"dependencies": {
"marked": "^18.0.9",
"sharp": "^0.35.3",
"terser": "^5.51.2",
"wordpress-honeypot": "^1.1.2"
}
}