Line 0
Link Here
|
|
|
1 |
var webpack = require('webpack'); |
2 |
|
3 |
module.exports = { |
4 |
entry: { |
5 |
moredetail: './koha-tmpl/intranet-tmpl/prog/js/public/moredetail.js', |
6 |
}, |
7 |
output: { |
8 |
path: './koha-tmpl/intranet-tmpl/prog/js/app', |
9 |
filename: '[name].js' // Template based on keys in entry above |
10 |
}, |
11 |
module: { |
12 |
loaders: [ |
13 |
{ |
14 |
test: /\.js$/, |
15 |
loader: 'babel-loader', |
16 |
query: { |
17 |
presets: ['react'] |
18 |
} |
19 |
} |
20 |
] |
21 |
}, |
22 |
resolve: { |
23 |
// you can now require('file') instead of require('file.js') |
24 |
extensions: ['', '.js', '.json'] |
25 |
}, |
26 |
plugins: [ |
27 |
new webpack.DefinePlugin({ |
28 |
'process.env':{ |
29 |
'NODE_ENV': JSON.stringify('production') |
30 |
} |
31 |
}), |
32 |
new webpack.optimize.UglifyJsPlugin({ |
33 |
compress:{ |
34 |
warnings: false |
35 |
} |
36 |
}) |
37 |
], |
38 |
devServer: { |
39 |
stats: { |
40 |
colors: true, |
41 |
hash: false, |
42 |
version: false, |
43 |
timings: false, |
44 |
assets: false, |
45 |
chunks: false, |
46 |
modules: false, |
47 |
reasons: false, |
48 |
children: false, |
49 |
source: false, |
50 |
errors: false, |
51 |
errorDetails: false, |
52 |
warnings: false, |
53 |
publicPath: false |
54 |
} |
55 |
} |
56 |
}; |