I have a npm project that uses jquery.
var $ = require(\'jquery\');
I also have an index html file that references bootstrap.
//install expose-loader
npm install jquery --save //Installing jquery and saving to package.Json
npm install bootstrap --save//Installing boostrap and saving to package.Json
npm install expose-loader --save-dev//Installing expose-loader and saving to package.json
// webpack
module: {
rules: [
{
test: require.resolve('jquery'),
loader: 'expose-loader?jQuery!expose-loader?$'
}
]}
// javascript file
var $ = require("expose-loader?$!jquery");
require('bootstrap');
require('jquery.easing');