Shift with red gradient lettering

Upgrade from Laravel Mix to Vite

The Vite Converter automates the upgrade of your Laravel application from using Laravel Mix to Vite. Laravel adopted Vite as its frontend build tool in Laravel 9 as a modern, faster alternative to Laravel Mix.

Using the Vite Converter to automatically upgrade your Laravel application has an estimated time savings of 1 hour.

Screenshot of a pull request with automated changes from the Vite Converter


A Laravel application running Laravel 9.x and Laravel Mix. If you're not running Laravel 9, you may upgrade with the Laravel 9.x Shift.

Automated Conversions

The Vite Converter automates many of the upgrades listed in the Vite Upgrade Guide, including:

  • Bumping your laravel/framework dependency.
  • Adding npm dependencies.
  • Updating your npm scripts to use Vite.
  • Configuring Vite for your project.
  • Removing webpack.mix.js.
  • Renaming MIX_* environment variables.
  • Converting JavaScript require statements to import.
  • Adding PostCSS configuration for Tailwind.
  • Converting to the new @vite Blade directive.
  • Converting Laravel Mix test helpers.

Manual Conversions

Vite has stricter code requirements than Laravel Mix. As such, if your project is using Vue, React, or Inertia, you may need to perform some additional manual steps, such as updating file extensions. Shift will attempt to leave a detail comment outlining these additional steps in the PR.

Sign in with any of the following services to connect Shift with your Laravel project.

Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.