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:
+3
-1
@@ -34,7 +34,9 @@ static/psd
|
||||
static/psd/yo DNI.psd
|
||||
|
||||
# CSS build output (generated by Lightning CSS)
|
||||
static/dist/
|
||||
# We track bundle.min.css for production but ignore dev bundle
|
||||
static/dist/bundle.css
|
||||
!static/dist/bundle.min.css
|
||||
|
||||
# Temporary implementation artifacts (prevent clutter)
|
||||
*_SUMMARY.md
|
||||
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
@@ -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