I suggest checking the devtools and the network tab to see which request takes time.
The first loading of the website takes 20 seconds
Hello,
I'm using vite with the last version of Laravel. It's faster than webpack when I update my code, but there is a problem for the first loading of the website.
I type npm run dev in the console and vite is ready within 2 seconds.
Then I open the browser and I type the address localhost:8000 and it takes 20 seconds to load an empty page. Once this first loading of the website is done, all works fine.
Have you any idea why it takes so much time for the first loading ?
Thanks for your answer.
Vincent
It is true that the vite server can take a bit to connect on the first connection, but 10 seconds sounds wild. On my own machine its 1-2 seconds on first connect
Please or to participate in this conversation.