I am using Laravel 5.3,
I want to pack all the javascript files,in file app.js,I require() tether and cropper like this:
:
require('tether');// `tether` is put at the head of `Bootstrap`
require('./bootstrap');
require('cropper');
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: 'body'
});
Then running gulp,it's ok!
But in console of chrome broswer,there are 2 errors:
Uncaught Error: Bootstrap tooltips require Tether
Uncaught TypeError: $image.cropper is not a function
Why is it?
PS:
bootstrap not Bootstrap,there is a file bootstrap.js in resources/assets/js,and Bootstrap is the UI of Twitter.
import Tether from 'tether'; window.Tether = Tether;?[Vue warn]: Cannot find element: body<body><div id="app">Your page</div></body>and changeel: 'body'toel: '#app'. In Vue 2.0htmlorbodycan't be used forel.