-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
62 lines (54 loc) · 1.59 KB
/
webpack.config.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
var path = require('path');
var webpack = require('webpack');
webpack.optimize.UglifyJsPlugin({ output: {comments: false} });
module.exports = {
entry: {
app: './src/common/js/app.js',
vendor: ['./src/lib/js/easy-button.js','./src/lib/js/jQDateRangeSlider-min.js','./src/lib/js/Leaflet.Modal.js','./src/lib/js/L.D3SvgOverlay.min.js','./src/lib/js/typeahead.jquery.js','babel-polyfill']
},
output: {
path: 'dest',
publicPath: 'dest',
filename: 'app.min.js',
},
externals: {
"leaflet": "L",
"d3": "d3",
"jquery": "jQuery"
},
module: {
preLoaders: [
{
test: /\.js$/,
include: path.join(__dirname, './src/common/js'),
loader: 'eslint',
exclude: /node_modules/
}
],
loaders: [
{
test: /\.js$/,
include: path.join(__dirname, './src/common/js'),
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ["es2015"],
}
},
{ test: /\.png$/, loader: "url-loader?limit=100000" },
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js")
],
eslint: {
configFile: 'eslintrc'
}
};
// webpack-dev-server --host 0.0.0.0 --port 8080 --watch --inline --content-base /home/nitrous/public_html/CO_Grants/
// http://red-meteor-147235.nitrousapp.com:8080/webpack-dev-server/