Parcel: Cannot get element after self-closing Vue component

Created on 26 Sep 2018  路  2Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

After upgrade to parcel-bundler 1.10.0

If there are something after a self-closing vue component like:

<button>    
  <slot />
  <span>You can't see me!</span>
</button>

You will see no <span> after <slot> content.

But if you change it to:

<button>    
  <slot></slot>
  <span>You can see me!</span>
</button>

The <span> will be seen.

馃帥 Configuration

{
  "name": "parcel-vue-self-closing-component-bug",
  "version": "1.0.0",
  "license": "MIT",
  "main": "index.html",
  "scripts": {
    "start": "parcel index.html --no-cache --open"    
  },
  "devDependencies": {
    "@vue/component-compiler-utils": "^2.2.0",    
    "parcel-bundler": "^1.10.0",    
    "vue-template-compiler": "^2.5.16"    
  },
  "dependencies": {
    "vue": "^2.5.16",
    "vue-hot-reload-api": "^2.3.1"
  },
  "alias": {
    "vue": "./node_modules/vue/dist/vue.common.js"
  }
}

馃 Expected Behavior

Using self-closing Vue component would be OK.

馃槸 Current Behavior

I can see nothing after self-closing Vue component in the page.

馃敠 Context

After upgrade to parcel-bundler 1.10.0

馃捇 Code Sample

https://github.com/nyaapass/parcel-vue-self-closing-component-bug

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.10.0
| Node | 8.12.0
| npm/Yarn | Yarn 1.9.4
| Operating System | macOS 10.13.6

Bug

Most helpful comment

@DeMoorJasper

But when I was using v1.9.7, everything was okay. (Here is a demo branch using v1.9.7)

It seems like some changes in v1.10.0 caused this problem.

All 2 comments

There is already be an open issue about this as far as I know.

Duplicate of #1363

@DeMoorJasper

But when I was using v1.9.7, everything was okay. (Here is a demo branch using v1.9.7)

It seems like some changes in v1.10.0 caused this problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Clickys picture Clickys  路  61Comments

mjrjoh picture mjrjoh  路  40Comments

devcati picture devcati  路  45Comments

Znarkus picture Znarkus  路  38Comments

garrydzeng picture garrydzeng  路  95Comments