Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ssr] Async route definition isn't compatible with SSR mode #498

Closed
JounQin opened this issue Sep 27, 2020 · 3 comments
Closed

[ssr] Async route definition isn't compatible with SSR mode #498

JounQin opened this issue Sep 27, 2020 · 3 comments

Comments

@JounQin
Copy link

JounQin commented Sep 27, 2020

Version

4.0.0-beta.12

Reproduction link

https:/JounQin/serverless-study/blob/master/src/router.ts#L11

Steps to reproduce

  1. run yarn dev, works as expected with .then(Comp => Comp.default)
  2. remove .then(Comp => Comp.default), [Vue warn]: Component is missing template or render function. will be logged from @vue/server-renderer, and no route content will be server rendered, and client side route will do the job

What is expected?

Without .then(Comp => Comp.default), the async route on sever should also work

What is actually happening?

Inconsistent between client and server

@JounQin
Copy link
Author

JounQin commented Sep 27, 2020

Seems related to: vitejs/vite#764

@posva
Copy link
Member

posva commented Sep 27, 2020

This is an upstream bug as commented in the linked issue. I added a test at 65c18db

@posva posva closed this as completed Sep 27, 2020
@JounQin
Copy link
Author

JounQin commented Sep 27, 2020

@posva The test case seems different, the issue is caused by Promise<{default: Component}>.

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

No branches or pull requests

2 participants