Skip to content

Commit 9e22618

Browse files
authored
Merge pull request #73 from ammar-madni/ammar/update-default-hmr-port-sail
Add note for people using Laravel Sail to get local dev environment working with Vite.
2 parents 5549ed8 + d330c62 commit 9e22618

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

UPGRADE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,16 @@ You may start the SSR server using `node`:
328328
node storage/ssr/ssr.js
329329
```
330330

331+
### Optional: Expose Vite port when using Laravel Sail
332+
333+
If you would like to run the `npm run dev` command in a Laravel Sail container, you will need to publish a port in your `docker-compose.yml` file:
334+
335+
```diff
336+
ports:
337+
- '${APP_PORT:-80}:80'
338+
+ - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
339+
```
340+
331341
### Wrapping up
332342

333343
You should now be able to build your assets using `dev` command. This will also invoke the Vite server and Vite will watch for file changes:

0 commit comments

Comments
 (0)