Replies: 6 comments 7 replies
-
This is expected behaviour. You should generally only be running SSR in your production environment, and you can just add the SSR build and process restart to your build/CICD process. |
Beta Was this translation helpful? Give feedback.
-
So you use Typescript to catch problems early but using a testing suite as part of your development flow is too much because "the world is not ideal"? You can run Vitest or other testing whenever you like during development. Why would you have to wait for the CICD pipeline to do so? The SSR build is, by design, one single, self-contained package containing fully-compiled assets. You can stick a reload watcher on it (as you do already), but there's no possibility of extending HMR to work with it. Therefore, proper testing is your best (and easiest) bet. |
Beta Was this translation helpful? Give feedback.
-
So what is the expected workflow here? I want to use root hydration in my app, but when the SSR is not enabled during dev, I keep getting an error about the DOM mismatch. Do people enable root hydration only on production? |
Beta Was this translation helpful? Give feedback.
-
Our team stuck at the exact same location but we managed to find a workaround. On production env the flow is like in the docs. We built a separated container which spins up the inertia server and our laravel app communicate with it. On dev however we have 2 separate containers. The first one is running the build in watch mode with |
Beta Was this translation helpful? Give feedback.
-
@alex-uxify What is meant by "the whole folder" here? |
Beta Was this translation helpful? Give feedback.
-
I think the greatest achievement of having SSR during dev would be improving the experience of using markup assertion in feature tests. I know Dusk can handle this, but honestly, setting it up correctly is a pain, and I miss being able to simply |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've followed the setup instructions for enabling SSR, and so far everything works fine. But I've noticed that once I do any change in my frontend code, I need to stop the SSR process, rebuild it, and start it again. Otherwise the SSR'd content will be always out of date (with whatever I had in my frontend code at the time I ran the build command).
Is this intended/expected behavior? Or do you think I have something wrong with my setup?
So far I've worked around this problem by automating the rebuild and restart with nodemon, but not sure if there's a better or recommended way to handle this.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions