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

Pug: using a named slot without prop receiving, results in a compilation error #634

Closed
joostdelange opened this issue Jul 28, 2020 · 0 comments · Fixed by #641
Closed

Pug: using a named slot without prop receiving, results in a compilation error #634

joostdelange opened this issue Jul 28, 2020 · 0 comments · Fixed by #641

Comments

@joostdelange
Copy link

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

Describe the bug

I use <template lang="pug"> with the pug npm package in my project.

When I use a named slot from a component like this: template(v-slot:header), it can't compile anymore
But when I explicitly include the slot prop with it: template(v-slot:header="slotProp", it does work

This always worked in vue-cli projects so I'm curious if this can be fixed in vite

Reproduction

https:/joostdelange/vite-pug-slot-bug

System Info

  • vite version: 1.0.0-rc.3
  • Operating System: macOS
  • Node version: 12.16.2
  • vue version: 3.0.0-rc.4
  • @vue/compiler-sfc version: 3.0.0-rc.4

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. See the error: Uncaught SyntaxError: Unexpected token ':'
@joostdelange joostdelange changed the title Pug: using a named slot without prop receiving results in a compilation error Pug: using a named slot without prop receiving, results in a compilation error Jul 28, 2020
underfin added a commit to rolldown/vite that referenced this issue Jul 29, 2020
yyx990803 pushed a commit to rolldown/vite that referenced this issue Jul 30, 2020
yyx990803 added a commit that referenced this issue Jul 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant