Created
February 17, 2017 10:54
-
-
Save lattespirit/445715f59ad7e030c7fc12efaf52e608 to your computer and use it in GitHub Desktop.
Webpack config for bootstrap and jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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