Skip to content

Instantly share code, notes, and snippets.

@lattespirit
Created February 17, 2017 10:54
Show Gist options
  • Save lattespirit/445715f59ad7e030c7fc12efaf52e608 to your computer and use it in GitHub Desktop.
Save lattespirit/445715f59ad7e030c7fc12efaf52e608 to your computer and use it in GitHub Desktop.
Webpack config for bootstrap and jQuery
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './app/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment