https://dev.to/sureshramani https://vitejs.dev/ is the Next Generation Frontend Tooling, which is Laravel's default from now on. https://vitejs.dev/ is a build tool created by Evan You (creator of Vue) which utilizes the availability of native ES modules in the browser.

It is already enough for me to be Laravel's new default front-end bundling, but let's also talk about some details.

import laravel from 'laravel-vite-plugin' import {defineConfig} from 'vite' export default defineConfig({ plugins: [ laravel([ 'resources/css/app.css', 'resources/js/app.js', ]), ], }); This is where we use the vite and laravel-vite-plugin packages, and we also define our asset paths. Create a vite.config.js file in the root of your project: import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ plugins: [ laravel([ 'resources/css/app.css', 'resources/js/app.js', ]), ], }); #using-vite-in-your-templates Using Vite In Your Templates
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners