UNPKG

794 BJavaScriptView Raw
1var path = require('path');
2var webpack = require('webpack');
3
4const plugins = [
5 new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
6 new webpack.optimize.OccurenceOrderPlugin(),
7 new webpack.optimize.DedupePlugin(),
8 new webpack.optimize.UglifyJsPlugin({
9 compress: { warnings: false },
10 }),
11];
12
13module.exports = {
14 devtool: null,
15  entry: path.resolve(__dirname, '../src/manager/index.js'),
16  output: { path: path.resolve(__dirname, '../dist/webapp/public'), filename: 'manager.js' },
17 plugins: plugins,
18  module: {
19    loaders: [
20 {
21 test: /.jsx?$/,
22 loader: 'babel-loader',
23 exclude: path.resolve(__dirname, '../node_modules/'),
24 query: {
25 presets: ['es2015', 'react', 'stage-0']
26 }
27 }
28 ]
29  },
30};