Skip to content

Commit f34b866

Browse files
authored
Merge pull request #41 from laravel/vapor
[0.x] Document vapor upgrade process
2 parents 37ec798 + ce89fe4 commit f34b866

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

UPGRADE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,28 @@ If you are using the `$this->withoutMix();` helper in your tests, you should rep
217217
+ $this->withoutVite();
218218
```
219219

220+
### Vapor
221+
222+
If you are deploying your application to Laravel Vapor, there are a few things you will want to handle before deploying.
223+
224+
Ensure you have updated to at least version `1.40.0` of the Vapor CLI package:
225+
226+
```sh
227+
composer require laravel/vapor-cli:^1.40.0
228+
```
229+
230+
Next, if you are using the Vapor asset helper in your application, you only need to utilize the asset helper when you are referencing assets you don't want bundled, such as those that already live in your public directory.
231+
232+
If you want to use the asset helper with your Vite project, you will also need to specify the base URL for assets in your application's entry point, for example in your `resources/js/app.js,` like so:
233+
234+
```diff
235+
- window.Vapor = require('laravel-vapor');
236+
+ import Vapor from 'laravel-vapor';
237+
238+
+ window.Vapor = Vapor;
239+
+ window.Vapor.withBaseAssetUrl(import.meta.env.VITE_VAPOR_ASSET_URL)
240+
```
241+
220242
### Optional: Configure Tailwind
221243

222244
If you are using Tailwind, perhaps with one of Laravel's starter kits, you will need to create a `postcss.config.js` file. Tailwind can generate this for you automatically:

0 commit comments

Comments
 (0)