请教 Laravel 5.3 撸 vue 2.1.4 撸不起来
package.json
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"bootstrap-sass": "^3.3.7",
"font-awesome": "^4.7.0",
"gulp": "^3.9.1",
"jquery": "^3.1.0",
"laravel-elixir": "^6.0.0-14",
"laravel-elixir-vue-2": "^0.2.0",
"laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.16.2",
"metismenu": "^2.6.0",
"tether": "^1.4.0",
"vue": "^2.1.4",
"vue-resource": "^1.0.3"
},
"dependencies": {
"laravel-echo": "^1.0.5",
"pusher-js": "^3.2.1"
}
}
gulp 入口 app.js
window.Vue = require('vue');
require('vue-resource');
Vue.http.interceptors.push((request, next) => {
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
next();
});
html 页面 body 下面就是这个id
<body>
<div id="wrapper">
实例化
var Vm = new Vue({
el : '#wrapper',
});
报错
vue.runtime.common.js?bd92:509
[Vue warn]: Failed to mount component: template or render function not defined.
(found in root instance)
请教各位大神, 这是什么情况呀:
推荐文章: