You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have scaffolded an Inertia Vue SSR application using Laravel breeze with the following breeze command:
php artisan breeze:install vue --ssr
Everything works correctly but there is a little bug that bothers me, almost all the time, when i start the dev server i get the following warning in the console: The Vite server should not be accessed directly. Your Laravel application's configured APP_URL is: X
Im not accessing the vite dev server url, im using Laravel Valet and im accessing the "fancy" vhost url.
Steps To Reproduce:
Install Laravel and enter the directory:
laravel new test && cd test
Require Breeze
composer require laravel/breeze
Scaffold a Breeze Inertia Vue SSR app using
php artisan breeze:install vue --ssr
Run the dev server
npm install && npm run dev
Go to your app
Using your web browser navigate to your app, usually the APP_URL that the dev server suggests
Stop the dev server
WITHOUT CLOSING YOUR APP TAB ON YOUR BROWSER Ctrl + c on the console, to close the dev server
Start it again
npm run dev
Now you should be seeing the warning, which shouldnt be showing because the user never accesed the dev server URL directly
Just noticed this also happens scaffolding the Breeze Vue Inertia application without SSR.
The text was updated successfully, but these errors were encountered:
Bosphoramus
changed the title
Error using Inertia SSR: The Vite server should not be accessed directly.
Error while using Inertia Vue: The Vite server should not be accessed directly.
Jul 20, 2022
I believe this is because Vite 3 now pings the root URL when the HMR server disappears.
It's a bit hard to reliably detect whether the user is visiting it vs. it being pinged by the Vite client, as the requests are both made by the browser.
I'm inclined to remove the console warning as the index page we serve should hopefully be enough to guide users towards running a dev server for Laravel.
Description:
I have scaffolded an Inertia Vue SSR application using Laravel breeze with the following breeze command:
php artisan breeze:install vue --ssr
Everything works correctly but there is a little bug that bothers me, almost all the time, when i start the dev server i get the following warning in the console: The Vite server should not be accessed directly. Your Laravel application's configured APP_URL is: X
Im not accessing the vite dev server url, im using Laravel Valet and im accessing the "fancy" vhost url.
Steps To Reproduce:
Install Laravel and enter the directory:
laravel new test && cd test
Require Breeze
composer require laravel/breeze
Scaffold a Breeze Inertia Vue SSR app using
php artisan breeze:install vue --ssr
Run the dev server
npm install && npm run dev
Go to your app
Using your web browser navigate to your app, usually the APP_URL that the dev server suggests
Stop the dev server
WITHOUT CLOSING YOUR APP TAB ON YOUR BROWSER Ctrl + c on the console, to close the dev server
Start it again
npm run dev
Now you should be seeing the warning, which shouldnt be showing because the user never accesed the dev server URL directly
Just noticed this also happens scaffolding the Breeze Vue Inertia application without SSR.
The text was updated successfully, but these errors were encountered: