Vue: $mount not work properly in the plugin

Created on 26 Sep 2017  ·  2Comments  ·  Source: vuejs/vue

Version

2.4.2

Reproduction link

https://github.com/GoNtte/plugin

Steps to reproduce

run the project, click vue logo.
Click the method call the message plugin

What is expected?

in the page should show text: vue plugin

What is actually happening?

plugin message don't show up properly, only show a empty div node


The code works fine in vue2.3.4

Most helpful comment

vue-loader 13+ exports an ES module now, so you need to do:

let MessageConstructor = Vue.extend(require('./message.vue').default)

All 2 comments

vue-loader 13+ exports an ES module now, so you need to do:

let MessageConstructor = Vue.extend(require('./message.vue').default)

why do this

Was this page helpful?
0 / 5 - 0 ratings