tonysm/importmap-laravel
Importmap Laravel brings native ES module import maps to Laravel, letting you use modern JavaScript packages without a bundler. Pin dependencies from CDNs, manage vendor modules, and skip complex build steps while keeping Blade and Laravel integration simple.
sha384 hashing, manifest generation, cache busting) with a maintained MIT package. You are buying a pattern and a thin helper, not a platform — so budget for internal ownership.importmap.php manifest of pinned URLs with SRI hashes is an auditable dependency inventory — useful for CSP/SRI reviews and lightweight compliance evidence, in contrast to a transitive package-lock.json graph.Adopt when:
Look elsewhere (Vite, or a real bundler) when:
De-risking note: the two approaches coexist. Running Vite for the app shell and importmaps for admin surfaces is a legitimate transitional architecture and makes the decision reversible.
For executives: This is a free, MIT-licensed Laravel package that lets us ship modern JavaScript without a Node build pipeline. The business case is cost and risk reduction, not new features: fewer CI minutes and container layers, a smaller third-party dependency surface, explicit version pins with integrity hashes for auditability, and a frontend workflow our PHP developers can own end to end. It fits admin tools, internal apps, and content surfaces well; it is not a fit for a customer-facing SPA. Recommendation: a bounded pilot on one internal surface with a documented exit path back to Vite. The principal risk is project maturity — one primary maintainer and roughly 150 GitHub stars — which we mitigate by treating this as adopting a documented browser standard with a thin helper, keeping every pin in version control, so switching costs stay low and reversible.
For engineering: Import maps are a browser standard, so this is not a proprietary runtime — it is a thin pinning and manifest layer. You get a versioned importmap.php manifest of pinned ESM URLs with SHA-384 SRI, artisan commands to pin and update, and Blade-level wiring. There is no transpile step, no bundle, and no node_modules; deploys are static assets plus a JSON manifest, and cache busting comes from content digests. The costs are real and should be accepted explicitly: no HMR, no tree-shaking or code splitting, a module waterfall on cold loads (fine over HTTP/2), and manual version management. Proposed guardrails: pilot scope limited to one surface, a written pin-review policy, and a CI check that the manifest is in sync with what is actually served.
How can I help you explore Laravel packages today?