Laravel Mix to Vite Migration Guide
January 16, 2026
•
1 min read
•
59 views
Table of Contents
Migrate to Vite:
Install Vite
npm remove laravel-mix
npm install --save-dev vite laravel-vite-plugin
Create vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
Update Blade
@vite(['resources/css/app.css', 'resources/js/app.js'])
Update Scripts
"scripts": {
"dev": "vite",
"build": "vite build"
}
Related Posts
Laravel Sanctum API Authentication Complete Guide
Build secure API authentication with Laravel Sanctum for SPAs and mobile apps.
Laravel Rate Limiting: Protect Your Application
Implement rate limiting to protect your Laravel application from abuse.
Laravel Blade Components: Build Reusable UI
Create powerful reusable components with Laravel Blade.
Comments (0)
No comments yet. Be the first to comment!