Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

feat!: disable ssr by default #139

Merged
merged 3 commits into from
May 12, 2021
Merged

feat!: disable ssr by default #139

merged 3 commits into from
May 12, 2021

Conversation

pi0
Copy link
Member

@pi0 pi0 commented May 12, 2021

This PR disables server-side rendering by default when in vite mode. (development)

We have a working server implementation (src) based on vite's rollup production build but it is not a proper implementation and even vite-plugin-vue2 has not SSR support! (it is working by workaround) causing issues like #7, slower build times, and overall worst developer experience.

The downside of doing this change is that it makes it harder to discover SSR issues (like hydration errors or module incompatibility) but makes it easier for adoption. For (nuxt-vite) development and tests, SSR is still enabled. Also, production builds use webpack for SSR so it only affects development.

New options: (nuxt.config)

  • vite.ssr (boolean or vite ssr options)
  • vite.experimentWarning (allows disabling banner)

image

@pi0 pi0 merged commit 5de0470 into main May 12, 2021
@pi0 pi0 deleted the chore/disable-ssr branch May 12, 2021 11:25
@pi0
Copy link
Member Author

pi0 commented May 12, 2021

Released as 0.1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant