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

Conversation

@antfu
Copy link
Member

@antfu antfu commented Aug 31, 2021

No description provided.

// Disable SSR by on dev by default
const ssrEnabled = nuxt.options.ssr && nuxt.options.vite?.ssr
if (!ssrEnabled) {
const isBuild = !nuxt.options.dev && viteOptions.build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antfu What would you say the blockers are from using SSR in both dev & prod?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the build is done via @vitejs/plugin-legacy, which make the bundling speed and bundle size worse then Webpack. As discussed with @pi0 we might need to figure out an solution for this while been careful about this default change, so maybe we will enabled build by default in v0.3.x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. PS: We are using a nasty workaround for vue2 plugin's SSR support also preload/prefetch needs module id augmentation (same as css-loader fork for vue2 and vue-loader)

@pi0 pi0 changed the title fix: enabled ssr on build by default fix: enable ssr when build: true is provided Sep 1, 2021
@pi0
Copy link
Member

pi0 commented Sep 1, 2021

Note: This is a workaround since the current build: true flag for production mode, does not support client only build (ssr: false). (#185)

I'm pending this PR to check if there is a quick solution to #185 and not hiding problem but if not, we shall proceed with this for a quick fix.

@pi0 pi0 closed this Sep 8, 2021
@pi0 pi0 deleted the fix/ssr-build branch September 8, 2021 14:16
@pi0
Copy link
Member

pi0 commented Sep 8, 2021

Let's have proper SSR support and also fix SPA issue in the meanwhile without workaround :)

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.

4 participants