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 v-slot:slot-name without slot prop results compilation error #1383

Closed
joostdelange opened this issue Jan 6, 2021 · 0 comments
Closed

Comments

@joostdelange
Copy link

Describe the bug

When using pug in my Vue component templates, and calling a named slot using the v-slot syntax I ran into some problems when using it without a slot prop.

The following is a happening:

  • This works: template(v-slot:slot-name="slotProp")
  • This does not: template(v-slot:slot-name)

This bug occurred in version 1.x already and was solved in #634,
so I'm confident it can be fixed in v2.x too.

Reproduction

https://github.com/joostdelange/vite-beta-pug-slot-bug

System Info

  • vite version: v2.0.0-beta.7
  • vue version: v3.0.5
  • pug version v3.0.0
  • Operating System: macOS
  • Node version: v14.15.1
  • Package manager (npm/yarn/pnpm) and version: npm v6.14.10

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. See the error: Cannot read property 'length' of undefined
@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

No branches or pull requests

1 participant