When working with Vue (^2.0.0-rc.6) and Browserify, the entry point is index.js:
import Vue from 'vue'
import App from './containers/App.vue'
new Vue({ // eslint-disable-line no-new
el: '#root',
render: (h) => h(App)
})
The content of App.vue:
<template>
<div id="root">
<hello></hello>
</div>
</template>
<script>
import Hello from '../components/Hello.vue'
export default {
components: {
Hello
}
}
</script>
<style>
body {
font-family: Helvetica, sans-serif;
}
</style>
Regarding Hello.vue:
<template>
<div class="hello">
<h1>\{{ msg }}</h1>
</div>
</template>
<script>
export default {
data () {
return {
msg: 'Hello Vue!'
}
}
}
</script>
Experiencing a blank white screen, is there something I overlooked?
UPDATE:
The entry html contains just
<div id="root"></div>
, no errors are showing up on the console logs, and I have confirmed that Hello.vue is being loaded as I see 'test' in the console log.
UPDATE 2:
Discovered the issue:
[Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in anonymous component - use the "name" option for better debugging messages.)
Does this indicate that I need to switch to a webpack solution? Is standard HTML not compatible in this scenario?
RESOLUTION: Import Vue from 'vue/dist/vue.js'