I am planning to use bootstrap so I first imported jquery.min file by using require() in main.js However, bootstrap throws an error like Bootstrap's JavaScript requires jQuery even I imported the jquery file before bootstrap.
main.js:
import vueResource from 'vue-resource';
import VueHead from 'vue-head';
import Vue from 'vue';
import router from './router';
require('../node_modules/bootstrap/dist/css/bootstrap.min.css');
require('../node_modules/font-awesome/css/font-awesome.min.css');
require('../node_modules/simple-line-icons/css/simple-line-icons.css');
require('./assets/css/app.css');
require('../node_modules/jquery/dist/jquery.min');
require('../node_modules/bootstrap/dist/js/bootstrap.min');
.....
I installed bootstrap(version 3.3.7) and jquery(version 3.2.1) from npm.
What is the correct way to import jquery so bootstrap won't throw the not found jquery error?
jquery.minorbootstrap.minwill work..minis just a version of the file that has all unnecessary characters removed in order to make the file size smaller. You still need to indicate what type of file this is. Looks like you just need to add.jsafter bothjquery.minandbootstrap.min..jsafter both of them didn't change anything. I am using WebStorm application to build the project. It actually wrote that path without.js