Laravel

Laravel Mix to Vite Migration Guide

January 16, 2026 1 min read 59 views

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"
}
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!