Skip to content

Instantly share code, notes, and snippets.

@weblee
Created September 2, 2016 12:45
Show Gist options
  • Save weblee/ed4f2700b92d1467067630b7e844ee2c to your computer and use it in GitHub Desktop.
Save weblee/ed4f2700b92d1467067630b7e844ee2c to your computer and use it in GitHub Desktop.
Webpack Config For Elixir
var webpack = require('webpack');
Elixir.webpack.mergeConfig({
module: {
loaders: [{
test: /resource\/vendor\/js\/.+\.(jsx|js)$/,
loader: 'imports?jQuery=jquery,$=jquery,this=>window'
}]
},
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