perf: Always use bundled CSS (28+ files → 1 file)
- Update head-styles.html to always load bundle.min.css - Remove development/production conditional CSS loading - Add CSS auto-rebuild to pre-commit hook - Track bundle.min.css in git (unignore it) - Reduces initial CSS requests from 28+ to 1
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
{{define "head-styles"}}
|
||||
<!-- CSS - Conditional loading: bundled in production, modular in development -->
|
||||
{{if .IsProduction}}
|
||||
<!-- CSS - Always use bundled CSS (built via 'make css-prod') -->
|
||||
<!-- Individual CSS files are merged into one bundle to reduce HTTP requests -->
|
||||
<link rel="stylesheet" href="/static/dist/bundle.min.css">
|
||||
{{else}}
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
{{end}}
|
||||
<!-- Print styles - loaded separately, only applied when printing -->
|
||||
<link rel="stylesheet" href="/static/css/print.css" media="print">
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user