//go:build dev package webbundler // Vendor handling for the dev server. Bare specifiers (solid-js, @solidjs/router, // solid-refresh, …) are served as single pre-bundled ESM files under /@vendor/, // wired up by an import map the SPA shell inlines. Because each specifier maps to // exactly one URL, and every vendor bundle re-externalizes the OTHER vendored // specifiers (rather than inlining them), solid-js stays a single runtime // instance across the whole app — the invariant the prod bundler also guards. import ( "encoding/json" "fmt" "net/http" "strings" esbuild "github.com/evanw/esbuild/pkg/api" ) const vendorURLPrefix = "/@vendor/" // buildImportMap returns the JSON `{"imports": {...}}` body the SPA shell inlines // in