Skip to content

v-slot compilation fails #170

Closed
Closed
@aantipov

Description

@aantipov

Does vue-jest support v-slot directive?

I use 4.0.0-beta.2 version of vue-jest and compilation of SFC with pug templates fails if there is v-slot directive.

For example, a template

<template lang="pug">
v-expansion-panel-content
    template(v-slot:header)
      div {{name}}

ends up with

Details:

SyntaxError: Unexpected token (1:123)
1 : var __render__ = function () {with(this){return _c('v-expansion-panel-content',{scopedSlots:_u([{key:"header",fn:function(v-slot:header){return [_c('div',[_v(_s(name))])]}}])})}}
                                                                                                                                   ^

      at Parser.pp$4.raise (node_modules/vue-template-es2015-compiler/buble.js:2610:13)

When I rewrite my template with the old syntax

<template lang="pug">
  v-expansion-panel-content
    template(slot="header")
      div {{name}}

then compilation works fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions