Skip to content

Commit f99ce30

Browse files
authored
Merge pull request #59 from timacdonald/upgrade
[0.x] Improve upgrade guide
2 parents 9eca390 + 75fdad8 commit f99ce30

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

UPGRADE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
> **Note** This upgrade guide does not cover all possible Mix use cases, such as Sass compilation. Please consult the [Vite documentation](https://vitejs.dev/guide/) for information on configuring Vite for these scenarios.
66
7+
### Update Laravel Framework
8+
9+
To make use of the new Vite integration, you will need to update to at least version `9.19.0` of the `laravel/framework`:
10+
11+
```sh
12+
composer require laravel/framework:^9.19.0
13+
```
14+
715
### Install Vite and the Laravel Plugin
816

917
First, you will need to install [Vite](https://vitejs.dev/) and the [Laravel Vite Plugin](https://www.npmjs.com/package/laravel-vite-plugin) using your npm package manager of choice:
@@ -119,6 +127,12 @@ The following function can be used instead:
119127
});
120128
```
121129

130+
Additionally, you should ensure you have updated to at least version `0.6.3` of the `inertia-laravel` package:
131+
132+
```sh
133+
composer require inertiajs/inertia-laravel:^0.6.3
134+
```
135+
122136
### Update environment variables
123137

124138
You will need to update the environment variables that are explicitly exposed in your `.env` files and in hosting environments such as Forge to use the `VITE_` prefix instead of `MIX_`:
@@ -330,6 +344,13 @@ npm run build
330344

331345
For further information on how to use Vite, please check out [the Laravel Vite documentation](https://laravel.com/docs/vite).
332346

347+
### Troubleshooting
348+
349+
If you have followed the upgrade guide, but are still having issues you should try the following steps:
350+
351+
- Run `php artisan view:clear` to clear any compiled view assets.
352+
- If your development web server is running on HTTPS, check out the ["Working With A Secure Development Server"](https://laravel.com/docs/9.x/vite#working-with-a-secure-development-server) section of the documentation.
353+
333354
## Migrating from Vite to Laravel Mix
334355

335356
### Install Laravel Mix

0 commit comments

Comments
 (0)