add bundler stuff

This commit is contained in:
2026-07-08 16:59:00 -04:00
parent 2a5fbffaa2
commit ba3d87c27f
12 changed files with 425 additions and 70 deletions

View File

@@ -27,17 +27,17 @@ import (
"time"
)
const frontendDir = "frontend"
const outputDir = "wwwroot"
type bundleStats struct {
files int
bytes int
}
// Build runs the full one-shot build: FA icon subset, public-route generation,
// the JS/CSS bundles, and the SSR bake, printing a stats summary.
func Build() error {
// the JS/CSS bundles, and the SSR bake, printing a stats summary. c selects the
// app + kjol web trees (see Config); zero-value fields fall back to the
// single-tree defaults.
func Build(c Config) error {
Configure(c)
// esbuild silently resolves a `.js` import to a sibling `.ts`/`.tsx`/`.jsx`,
// which lets misnamed specifiers slip through. Catch them up front so the
// import path always names the file that actually exists on disk.