Rather than including jquery and bootstrap in every .js file you can install these automatically using the ProvidePlugin plugin!
$ npm install -g vue-cli
$ vue init webpack my-project
$ cd my-project
$ npm install
$ npm run dev
$ npm install jquery --save-dev
$ npm install bootstrap --save-dev
Edit build/webpack.conf.js and add:
plugins: [
...
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
}),
...
And that's it.
There is now no longer any need to add these to the top of each file, so you can delete these:
import 'jquery'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap/dist/js/bootstrap.js'