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

Vue components html is included twice in production build #14763

Closed
denniswiemer opened this issue Sep 1, 2022 · 2 comments
Closed

Vue components html is included twice in production build #14763

denniswiemer opened this issue Sep 1, 2022 · 2 comments

Comments

@denniswiemer
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v16.15.0
  • Nuxt Version: 3.0.0-rc.8
  • Package Manager: yarn@1.19.2
  • Builder: vite
  • User Config: build, css, components, runtimeConfig, typescript
  • Runtime Modules: -
  • Build Modules: -
  • Default Nuxt 3 config with universal rendering

Reproduction

  • create a basic Vue component with only some html and no script or style
  • include the component in a layout

Describe the bug

When looking into the final build I expect the component html to be serverside rendered and only included in the server/index.mjs once. Currently the html from a component is indeed included in the server/index.mjs but also a chunk is loaded in the client which includes the same html dom. Of course we don't want that duplication as it's bad for performance.

Additional context

No response

Logs

No response

@516310460
Copy link
Contributor

Would you please provide a reproduction?

@danielroe
Copy link
Member

This is how Vue SSR hydration normally works. However, we are looking to add some new enhancements here, particularly with the introduction of server components, which won't have a corresponding chunk in client-side JS: nuxt/framework#5688.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants