meteor-vue / vue-meteor

🌠 Vue first-class integration in Meteor
897 stars 112 forks source link

vue-component not working? #324

Closed glor closed 5 years ago

glor commented 6 years ago

The console sais [HMR] Vue component hot reload shim applied. so vue-components seams to be loaded. I can also access imported vue components (as objects). But the text does not change from test to example. I also never get an alert(). It works in a plain vue setup (vue init webpack-simple) main.js:

import Vue from 'vue'
import App from './App'

new Vue({
    el: "#app",
    render: h => h( App ),
});

main.html:

<body>
<div id="app">test</div>
</body>

App.vue:

<template>
    <div id="app">
        content
    </div>
</template>

<script>
    export default {
        name: 'app',
        data: function () {
            return {
                msg: 'Welcome to Your Vue.js App',
                whatever: alert()
            }
        }
    }
</script>

<style>
</style>
vermadivyanshu commented 6 years ago

you see that your main and app.vue both have an id app, you might want to use a different id, that might be causing some problem. You cannot see an alert because you have not used whatever inside the template. I have not tried your code yet.

Akryum commented 5 years ago

It should be fixed in the upcoming release.