Tool Recommended Free MIT #vite #laravel #build #frontend

Vite

Frontend bundler for this site and every Laravel app I ship.

GitHub
GitHub
Homepage
Homepage
Official docs
Official docs
Pricing
Free

Vite compiles resources/css/app.css and resources/js/app.js into hashed files under public/build. Laravel's Vite helper loads the right URLs in Blade.

On this site that means Tailwind CSS, Alpine.js, and font files ship as versioned assets. Because production hosting has no shell, npm run build runs locally before git push, documented in shipping Laravel without SSH.

I recommend Vite because Laravel adopted it as the default, dev feedback is instant, and the manifest makes cache busting honest.

Commands

npm install
npm run dev    # local HMR
npm run build  # production manifest + hashed assets

Deploy without Node on the host

Run npm run build before push. Commit public/build and public/build/manifest.json. The @vite directive reads the manifest in production.

Load time notes

Keep the JS entry small: Alpine plus site hooks, not a framework. Let Tailwind purge unused utilities. Preload fonts only when they are above the fold.

Strengths

Fast HMR, first-party Laravel plugin, sensible defaults, tree-shaking for production, manifest-driven asset URLs.

Weaknesses

Requires Node on the build machine. Misconfigured content paths break Tailwind purging. CI must run build for deploy pipelines.

Pros

  • Official laravel-vite-plugin
  • Works with Tailwind and Alpine out of the box
  • Production output is static files hosts understand

Cons

  • Not needed for Pico-only static pages
  • Build step discipline on no-SSH hosts
  • Plugin upgrades need occasional attention

Versus

Choose Vite over Laravel Mix (retired) for all new work. Skip Vite only when you serve zero bundled assets, for example a Pico CSS page from a CDN link alone.

Notes by email

Occasional updates when I publish something new in the library or studio.

Found this useful? Support the work or buy me a coffee.