-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
70 lines (63 loc) · 1.88 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
62
63
64
65
66
67
68
69
var path = require('path');
var webpack = require('webpack');
webpack.optimize.UglifyJsPlugin({ output: {comments: false} });
var FlowStatusWebpackPlugin = require('flow-status-webpack-plugin');
module.exports = {
entry: {
app: './src/common/js/app.js',
vendor: ['./src/lib/js/easy-button.js','./src/lib/js/la.test.js','./src/lib/js/bootstrap-slider.js','./src/lib/js/leaflet-search.js','./src/lib/js/leaflet-spin.js','./src/lib/js/stupidtable.js','./src/lib/js/table2CSV.js','./src/lib/js/bootstrap-switch.js','./src/lib/js/jquery.history.js']
},
output: {
path: 'dest',
publicPath: 'dest',
filename: 'app.min.js',
},
externals: {
"leaflet": "L",
"google": "google",
"jquery": "jQuery",
"d3": "d3",
"ss": "ss"
},
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"),
new FlowStatusWebpackPlugin()
],
eslint: {
configFile: '.eslintrc'
},
worker: {
output: {
filename: "/hash.worker.js"
}
}
};
// 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/