Skip to content

Instantly share code, notes, and snippets.

@amite
Created April 3, 2017 03:45
Show Gist options
  • Select an option

  • Save amite/360e4142de81af4e1a9a770f036c502c to your computer and use it in GitHub Desktop.

Select an option

Save amite/360e4142de81af4e1a9a770f036c502c to your computer and use it in GitHub Desktop.
simple webpack config that loads jQuery
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: './app/src/index.js',
output: {
path: './app/build',
filename: 'bundle.js',
publicPath: '/'
},
devtool: 'eval-source-map',
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