I've been trying to figure this one out but I always get
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in )
I'm using laravel 5.2 with browserify with elixir and vue 2.2.2
I'm trying to display a simple view
this is my app.js
import Vue from 'vue';
import Test from './components/Test.vue';new Vue({ el : '.container', render: h => h(Test) })
Test.vue
<template>
<div class="view">
<h1>{{msg}} </h1>
</div>
</template>
<script type="text/javascript">
export default {
data (){
return {
msg : 'This is Vue'
}
}
}
</script>
<style>
div.view{
padding:2em;
position: relative;
}
</style>
require('vue')
the file that the default resultion algorithm goes to doesn't have, as the error says, a template compiler. If you're running it in node for the server renderer then it works but if you try to webpack it for a browser its missing. So what you need to do is to essentially require vue.common.js instead, I can do this in webpack by adding this to the config:resolve: { alias: { 'vue$': 'vue/dist/vue.common.js' }}
– justin.m.chase