Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Laravel Vite Plugin

Official Vite plugin for Laravel to handle asset bundling and HMR.

Build tools and bundlersNPM

GitHubWebsite

1. License

License from npm.

github.com/laravel/vite-plugin

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Laravel Vite Plugin does

Laravel Vite Plugin does one narrow job, setting up Vite for a Laravel backend server, and its README is only a pointer to the Laravel docs; the one builder write-up uses it outside Laravel, in a WordPress theme, to get the hot reloading he could not get from plain Vite.

Laravel Vite Plugin popularity

54 / 100
Gid Score, #1549 overall
3M
downloads a week, npm
903
GitHub stars
172
agent projects use it
Laravel Vite Plugin: downloads per weeknpm, laravel-vite-plugin 3,013,488
Laravel Vite Plugin: GitHub starslaravel/vite-plugin 903

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Laravel Vite Plugin is used

  • Laravel Vite Plugin is a dependency in 172 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.5% of the 4,867 JavaScript/TypeScript ones), #5 of 185 in build tools and bundlers.
  • Projects that use it most often also use Vite (100.0%), concurrently (87.2%), Tailwind CSS (97.7%).
  • It is more common in projects set up for Junie (58.1%) than for GitHub Copilot (2.0%).

By coding agent

131 projects, 5.4%
126 projects, 3.8%
61 projects, 2.0%
48 projects, 10.1%
43 projects, 58.1%
38 projects, 11.1%
35 projects, 7.5%
8 projects, 5.7%

Often used with

In 100.0% of its projects
In 87.2% of its projects
In 97.7% of its projects
In 54.1% of its projects
In 26.2% of its projects
In 42.4% of its projects
In 20.9% of its projects
In 20.3% of its projects

Laravel Vite Plugin in practice

Strengths

One stated job: Vite plus a Laravel backend

The README describes a single purpose. The plugin configures Vite so it works with a Laravel backend server.

Plain Vite config, with extras for CORS, SSL and HMR

Marc Wieland writes that the plugin lets you do "everything like in Vite" and adds "goodies" for CORS, SSL and hot module reloading. He gives these as the reason he failed when setting things up with plain Vite and switched to the plugin. With his manual setup he had compilation working, but not hot reloading.

Herd's SSL works with it

The same builder writes that "Herd automatically supports Vite within the Laravel Vite plugin". He says that once SSL is turned on for the project in Herd, "you don't get annoying warnings" from the browser about an insecure site.

Dev server and Vitest fixes in v3.2.0

The latest release handles null addresses on the dev server. It also stops the plugin from cleaning up the hot file when Vitest runs.

Watch out for

The README has no instructions

The repository README has no setup steps and no options. It points to the Laravel website for documentation.

No Blade outside Laravel, so you write the loader

In Laravel, a Blade directive injects the Vite scripts. In WordPress, the builder rebuilt that logic in PHP. His code checks for the dev server or reads <code>manifest.json</code> for the production files.

APP_URL has to be set

The builder had to set <code>APP_URL</code> in his env file to his home URL. He says this is what makes the dev server point at his actual homepage.

More about Laravel Vite Plugin

Packages around it
  • vite: Build tool the plugin configures
  • concurrently: Runs several commands at once
  • tailwindcss: Utility-first CSS framework
  • axios: HTTP client
  • @inertiajs/react: Inertia adapter for React
  • prettier: Code formatter
More in Build tools and bundlers

Alternatives

Laravel Vite Plugin This page

MITGid 543M/wk

Compare Laravel Vite Plugin with another tool

Get started

Install it.

npm install laravel-vite-plugin

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Laravel Vite Plugin
- Use the official docs at https://laravel.com/docs/vite. The GitHub README has no usage details.
- One builder's blog post, not the official docs, installs it as a dev dependency with `npm install laravel-vite-plugin --save-dev`. Check the official docs for the current install steps.
- Register it in `vite.config.js` with `import laravel from 'laravel-vite-plugin'` and list entry files in the `input` array of `laravel({ ... })`. `publicDirectory` can be set there too.
- In a Laravel app, Blade's Vite directive loads the assets. Outside Laravel there is no such directive, so the project has to write that loading code itself.
- One builder's WordPress setup, not the official docs: check for a `hot` file in the theme's assets folder (his `publicDirectory`) to detect the running dev server. If it is missing, read `build/manifest.json` and load the hashed files.
- Same WordPress setup: load `/@vite/client` and the entry script with `type="module"`. The author calls this "very important".
- Same WordPress setup: set `APP_URL` in the env file to the site's home URL before running `npm run dev`.