fix(vite): Skip SSR middleware in preview server for SPA mode#14673
fix(vite): Skip SSR middleware in preview server for SPA mode#14673jacob-ebey merged 5 commits intoremix-run:devfrom
Conversation
🦋 Changeset detectedLatest commit: cb861b1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @andreiborza, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
b27b054 to
10a9fd6
Compare
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
976d286 to
1053d8d
Compare
When `ssr: false` is configured, the build removes the server bundle but `configurePreviewServer` was attempting to import it, causing "Cannot find module" errors when using `vite preview`. Now skips SSR handling when SSR is disabled, allowing `vite preview` to work correctly in SPA mode. Closes: remix-run#14672
1053d8d to
37189ba
Compare
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
When
ssr: falseis configured, the build removes the server bundle butconfigurePreviewServerwas attempting to import it, causing "Cannot find module" errors when usingvite preview.Now skips SSR handling when SSR is disabled, allowing
vite previewto work correctly in SPA mode.Closes: #14672
Test demonstrating the issue: 8724df0
Fix for the issue: 37189ba