Created
September 2, 2016 12:45
-
-
Save weblee/ed4f2700b92d1467067630b7e844ee2c to your computer and use it in GitHub Desktop.
Webpack Config For Elixir
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 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