-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
I am using Vuejs 2 (webpack-simple template) and I would compile template before render it. Below my code :
App.vue
<template>
<div id="app">
<h1>{{ msg }}</h1>
</div>
</template>
<script>
export default {
name: 'app'
}
</script>
main.js
import Vue from 'vue'
import App from './App.vue'
const res = Vue.compile(App)
const vm = new Vue({
el: '#app',
data: {
msg: 'hello'
},
render: res.render,
staticRenderFns: res.staticRenderFns
})
But when I start the server I got this error : __WEBPACK_IMPORTED_MODULE_0_vue___default.a.compile is not a function
. Can you please help me to make it work ?
Metadata
Metadata
Assignees
Labels
No labels