laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.42k stars 10.99k forks source link

Laravel 9.19.0 with Vite on Windows #43110

Closed olivier-perrier closed 2 years ago

olivier-perrier commented 2 years ago

Description:

Laravel Vite server blanc page. I tried to deploy last laravel 9.19.0 version including Vite following to steps below. The Vite server seems not working.

Steps To Reproduce:

Commands lines provided below : laravel new breeze-test --git cd breeze-test composer require laravel/breeze php artisan breeze:install vue npm install npm run dev

Web browser error message : DNS_PROBE_FINISHED_NXDOMAIN


Also tried to install via composer with the same result.

Does any Windows user has the same issue ?

jessarcher commented 2 years ago

Hi @olivier-perrier, It is expected that the Vite dev server will show a blank screen when accessed directly (e.g. http://localhost:3000). You will still need to spin up a dev server for your Laravel project (e.g. php artisan serve or Laravel Sail) to access your Laravel application.

We have tried to make this clearer with https://github.com/laravel/vite-plugin/pull/57 which will be in the next release.

olivier-perrier commented 2 years ago

Thank you for your answer. Accessing the dev server (via artisan serve over localhost:8000 for example) does not provide any auto reload of the pages when files are saved. I also tried with version 0.3.0 of vite-plugin. Is it normal ?