Struggling with Laravel + Vite

preview_player
Показать описание
Laravel Herd has a nice `share` feature built in, but it doesn't handle Vite very well. Watch me fix that issue!

Follow Aaron:

Featured in this episode:

Chapters:
00:00 - Introduction to the Bug and Problem
01:03 - Setting Up Ngrok Configuration
03:31 - Resolving Site Not Found Issue
04:47 - Handling Mixed Content Warnings
05:59 - Running Vite Dev Server
06:53 - Creating a Vite Tunnel with Ngrok
07:58 - Updating Hot Reload URL
08:59 - Automating the Process with a Laravel Command
10:40 - Implementing Hot File Watcher
14:54 - Adding Clean-Up Functions
19:43 - Implementing Signal Handling for Command Termination
24:03 - Creating a Custom Share Service Provider
27:13 - Implementing Share File to Track State
30:32 - Finalizing the Share Command
33:46 - Wrapping Up
Рекомендации по теме
Комментарии
Автор

Maybe you should print the public URL in your terminal to make it easier to browse or share 😊. Great tip and excellent inspiration for my current project 🙂. I had the same problem with Laravel Herd; everything was working except the Vite server.

AlphaYZ
Автор

I dont even use Laravel, but the way you make the video was awesome!

polojuninho
Автор

Love this contents and how much important is writing clean and readable code. This is also one case when moving logic to a job does not make really sense. So great job!!!

MatteoPresot
Автор

you can also use cloudlflare tunnels and you can even specify a subdomain so i doesnt rotate as ngrok does. nice work 😊

julianfbeck
Автор

Man ! I learned a lot with this video! And I’m a 10+ years experience developer. 😂

hectorcenteno
Автор

Any time I hear someone say "beware of infinite loops", I always respond "unless you're Aaron Francis" - Dude this is sick! glad you got it working

I feel like through some vite conf related to `server.host` you could also set the public domain, but the idea of not even touching the vite config file directly is also pretty dope

guillermocava
Автор

my whole life I was pronounce ngrok wrong. I pronounce it as NG ROK 😭

umairsaeed
Автор

gotta love ryan reynolds doing laravel 😃

kingstalker
Автор

Wow I learned soooo much. And so useful right away! Thank you! Would Laravel Context maybe be a replacement for the sharefile solution? This might be a package idea - are thinking of making it into one?

sebastianhilger
Автор

good ol ngrok, good for paypal development notifications also

haidubogdan
Автор

Who else was waiting for him to add the ngrok URL to the output? 😆

kyngcytro
Автор

Great vid as always man! Would love to see all of this running from a single command

Then you can have my kingdom

SimonHamp
Автор

Hey Aaron,
I really like the camera setup you have. What camera and lights do you use?

mahmoudmousa
Автор

This man runs ublock origin AND adblock plus. Impenetrable :'D

i_Amazin_
Автор

Great work and great watch!
Will you publish the code somewhere? Maybe even make a package?

Pekzr
Автор

I think you can also change the Vite server url using a env variable, no need to manually update the public/hot file

vzlamrbeastfan
Автор

iOS Simulator should also help because you can hit local hosts.

mikeziri
Автор

Hey! I used vite in past few months in Windows, I also encountered that issue. I thought that was okay and normal not to render frontend in my phone after "npm run dev" because there was no nodejs installed in my phone, so i "npm run build" it and it works (atleast i will saw the changes) in the phone but only working if "npm run dev" server is stop. Does Ngrok supported in windows? I will try it, if it is.

richeriswertres
Автор

Did you manage to get WebSockets proxied as well to support auto-reloading?

MatthewPoulterVCSW
Автор

Awesome video. I need an AI service that's gonna pull all the code from this video into file(s) :D

GTCrais