Version
2.4.2
Reproduction link
https://github.com/sngeth/vue_test
Steps to reproduce
Ran vue init browserify vue_test
Used full build with compiler in setup options
Converted Hello.vue to Hello.js non SFC
import Vue from 'vue'
Vue.component('hello', {
template: `
<div id="hello">
<h1>{{ msg }}</h1>
</div>
`,
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
})
Changed App.vue to use Hello.js component
<template>
<div id="app">
<hello></hello>
</div>
</template>
<script>
import Hello from './components/Hello.js'
export default {
name: 'app',
components: {
Hello
}
}
</script>
Run npm run dev and goto localhost:8080
What is expected?
Expect application to render Hello component successfully
What is actually happening?
[Vue warn]: Failed to mount component: template or render function not defined.