[Vuejs]-Simple Vue component not rendering

2👍

vueify only transforms *.vue files, if you are going to use templating in your index.html then you need Vue compiler in order to compile the template in the browser (https://v2.vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only).

A good way to have things like that covered is to use a vuejs-template, if you are using Browserify there is one: https://github.com/vuejs-templates/browserify

But as you have almost everything up, you can only add what’s missing for the compiler package, as stated in "Runtime + Compiler vs. Runtime-only" – "Browserify" section in Vue guide.

Add to your package.json:

{
    "browser": {
        "vue": "vue/dist/vue.common.js"
    },
}

That will tell Browserify to use the full (also called standalone) Vue build on browser.


Another way is to not use templates in index.html but instead in a main component, like App.vue, for that you check out the template I linked above, it does it out of the box.

Leave a comment