perf: split CSS bundles for shop and admin pages
Create separate CSS bundles to reduce shop page load times: - app-shop.css (45KB/7.8KB gzip): Shop pages only, no daisyUI - app.css (139KB): Admin pages with daisyUI and theme editor Key changes: - Add app-shop.css with targeted @source paths for shop files only - Move .preview-frame rules from theme-layer2-attributes.css to app.css - Delete fonts.css (fonts now generated inline by CSSGenerator) - Add inline all-fonts generation in theme editor for typography switching - Configure separate Tailwind profiles and watchers for both bundles Shop pages now load 54% less CSS by excluding: - daisyUI components (admin only) - .preview-frame theme switching rules (editor only) - Admin-specific Tailwind utilities Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
8
mix.exs
8
mix.exs
@@ -86,9 +86,15 @@ defmodule SimpleshopTheme.MixProject do
|
||||
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
||||
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
|
||||
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
|
||||
"assets.build": ["compile", "tailwind simpleshop_theme", "esbuild simpleshop_theme"],
|
||||
"assets.build": [
|
||||
"compile",
|
||||
"tailwind simpleshop_theme",
|
||||
"tailwind simpleshop_theme_shop",
|
||||
"esbuild simpleshop_theme"
|
||||
],
|
||||
"assets.deploy": [
|
||||
"tailwind simpleshop_theme --minify",
|
||||
"tailwind simpleshop_theme_shop --minify",
|
||||
"esbuild simpleshop_theme --minify",
|
||||
"phx.digest"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user