laravel / vite-plugin

Laravel plugin for Vite.
MIT License
799 stars 151 forks source link

Laravel Vite requests to not load on fresh Laravel Install on Homestead #58

Closed mmillis1 closed 2 years ago

mmillis1 commented 2 years ago

Description:

Created a new laravel project, installed laravel breeze, run npm install and run dev, and JS and CSS files do not load in the browser. Using homestead as my local dev env running PHP 8.1. All requests to the vite dev server get blocked. Not using any SSL, just a local domain configured within the homestead.yaml. I've tried a couple of different config options within the vite.config.js file to specify my custom homestead domain but it did not fix it.

Console with blocked network requests image

Styles not loading image

Steps To Reproduce:

laravel new project composer require laravel/breeze --dev php artisan breeze:install npm install npm run dev

If I just run PHP artisan serve, styles and js load correctly - only issue while trying to visit a local domain that is running via homestead

mmillis1 commented 2 years ago

I'm sorry but I think I figured it out. Looking through some previous GitHub issues it looks like this is a Brave-specific issue! I turned off the "shield" and now things are working. Sorry for creating this ticket in haste but for anyone else having this issue on Brave this helped me: https://github.com/laravel/vite-plugin/issues/47

timacdonald commented 2 years ago

Glad you got it sorted @gradedcatfood For yourself and future visitors, you may also configure Brave to allow the Vite dev server to run on your specific project URLs.