私はWebPACKのでVuejs 2 + Vueのルータ2 + Laravel 5.3を使用しようとするとエラーに直面しています!ヴュー2 + VueRouter 2 + Laravel 5.3 - WebPACKの(ランタイムXスタンドアロン問題ビルド)
私のコードがあります:このHAVEで
私のindex.html
<div id="app">
<router-view></router-view>
</div>
マイapp.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
import Map from './map'
Vue.use(VueRouter);
const router = new VueRouter({
routes: Map
});
new Vue({
router,
render: h => {
return h(App)
}
}).$mount('#app');
マイApp.vue
<template>
<router-view></router-view>
</template>
<script>
export default {
name: 'App',
}
</script>
次のエラー:
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.
私はから私のVueのインポートを変更する場合: import Vue from 'vue/dist/vue.js'
に import Vue from 'vue'
それが正常に動作します!
誰かがそれを修正する方法を知っていますか?