Inertia setup with ViteJS doesn't detect page changes #1074
-
I have a pretty straight forward setup of Laravel and InertiaJS (using Vue as the frontend framework) with Vite as the frontend build tool. This is how things are set up:
From other resources online I've got the impression this should just work. I've updated all dependencies to the latest versions and done all of the sanity checks I can think of. Any references to help me get this working would be very much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I have also cross-posted this question to the ViteJS Github discussions here: vitejs/vite#6697 |
Beta Was this translation helpful? Give feedback.
-
By luck, and a good night's sleep I've stumbled upon the issue myself. In the client.ts file upon initializing the Inertia instance, I've used a capital for the directory from which to import page components.
Fixing this solved the issue. Having no obvious error made this quite a difficult issue to debug. Hopefully this can help someone else out. |
Beta Was this translation helpful? Give feedback.
By luck, and a good night's sleep I've stumbled upon the issue myself.
In the client.ts file upon initializing the Inertia instance, I've used a capital for the directory from which to import page components.
Fixing this solved the issue.
Having no obvious error made this quite a difficult issue to debug. Hopefully this can help someone else out.