# Laravel Vite Plugin — card for AI agents

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

Category: Build tools and bundlers · npm package `laravel-vite-plugin` · latest version 3.2.0 (checked 2026-11-01)
Install: `npm install laravel-vite-plugin`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (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`.

## What it is
- Laravel Vite Plugin is the `laravel-vite-plugin` package on npm. The README states its purpose in one line: "This plugin configures Vite for use with a Laravel backend server." The repository was created on 2022-05-02 and is MIT licensed.
- The README has no usage guide. It sends readers to the Laravel website for documentation. The latest release, v3.2.0, was published on 2026-08-11. It lists GitHub Actions bumps by Dependabot, a fix for null addresses on the dev server, a change so the hot file is not cleaned up when Vitest runs, and a `package.json` update "to mitigate high severities".
- The plugin targets projects with a Laravel backend. The builder write-up in these sources uses it in a Bedrock-based WordPress theme instead. He notes that Laravel has a Vite directive in Blade that loads the assets automatically. In WordPress he wrote that loading logic in PHP himself.

## Caveats
- 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 `manifest.json` for the production files.
- APP_URL has to be set: The builder had to set `APP_URL` in his env file to his home URL. He says this is what makes the dev server point at his actual homepage.

## Numbers (AgentGid data)
- Gid Score: 53.9 (#1549 of all tools, 85 of 185 in its category)
- Used in 172 public projects set up for AI coding agents (2.7%)
- Downloads last week: 3,013,488 (as of 2026-11-24), +41.3% over 4 weeks
- GitHub stars: 903 (as of 2026-11-24)
- Last push: 2026-11-11

## Often used with
Vite 100.0%, concurrently 87.2%, Tailwind CSS 97.7%, Axios 54.1%, Inertia.js React 26.2%, Prettier 42.4%

## Links
- AgentGid page: https://agentgid.com/tools/laravel-vite-plugin/
- Homepage: https://github.com/laravel/vite-plugin
- Repository: https://github.com/laravel/vite-plugin
- Source: https://github.com/laravel/vite-plugin#readme
- Source: https://github.com/laravel/vite-plugin
- Source: https://github.com/laravel/vite-plugin/releases

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
