forked from sanger-archive/aker-sets-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
42 lines (35 loc) · 911 Bytes
/
webpack.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const webpack = require('webpack');
module.exports = {
context: __dirname + '/app/client',
entry: {
common: ['babel-polyfill'],
'set-shaper': './set_shaper',
'search': './search'
},
output: {
path: __dirname + '/app/assets/javascripts',
filename: '[name].js',
publicPath: 'http://localhost:8080/'
},
resolve: {
extensions: ['', '.js', '.es6']
},
module: {
loaders: [
{
test: /\.es6$/,
loaders: ['babel-loader'],
exclude: /node_modules/
},
{ test: require.resolve("jquery"), loader: "expose?$!expose?jQuery" }
]
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
}),
new webpack.NoErrorsPlugin(), // Pauses execution on error
new webpack.optimize.CommonsChunkPlugin('common', 'common.js') // Builds a common.js of code shared between entry points
]
}