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

Layout component rendering is duplicated #2757

Open
linpengteng opened this issue Aug 20, 2024 · 3 comments
Open

Layout component rendering is duplicated #2757

linpengteng opened this issue Aug 20, 2024 · 3 comments

Comments

@linpengteng
Copy link

linpengteng commented Aug 20, 2024

Environment

  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.12.4
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, content, compatibilityDate
  • Runtime Modules: @nuxt/[email protected], @nuxt/[email protected]
  • Build Modules: -

Reproduction

look:
https://stackblitz.com/edit/github-5hgwqx?file=layouts%2Fcustom.vue,content%2Fabout.md,nuxt.config.ts,content%2Findex.md

image

Describe the bug

Layout component rendering is duplicated~

Additional context

No response

Logs

No response

@linpengteng
Copy link
Author

About #1722

@linpengteng linpengteng reopened this Aug 20, 2024
@linpengteng linpengteng changed the title Layout component are rendered repeatedly? Layout component rendering is duplicated Aug 20, 2024
@linpengteng
Copy link
Author

I tried it locally and found that even if app.vue does not exist, Nuxt seems to provide app.vue as a virtual file.

  <template>
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </template>

@linpengteng
Copy link
Author

linpengteng commented Aug 20, 2024

create app.vue in nuxt project, it works normally.

// app.vue

  <template>
      <NuxtPage />
  </template>

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

1 participant