1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _path = require('path');
|
8 |
|
9 | var _path2 = _interopRequireDefault(_path);
|
10 |
|
11 | var _webpack = require('webpack');
|
12 |
|
13 | var _webpack2 = _interopRequireDefault(_webpack);
|
14 |
|
15 | var _utils = require('./utils');
|
16 |
|
17 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18 |
|
19 | var entries = {
|
20 | preview: [],
|
21 | manager: [_path2.default.resolve(__dirname, '../../manager')]
|
22 | };
|
23 |
|
24 | var config = {
|
25 | bail: true,
|
26 | devtool: '#cheap-module-source-map',
|
27 | entry: entries,
|
28 | output: {
|
29 | filename: 'static/[name].bundle.js',
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | publicPath: ''
|
36 | },
|
37 | plugins: [new _webpack2.default.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }), new _webpack2.default.optimize.DedupePlugin(), new _webpack2.default.optimize.UglifyJsPlugin({
|
38 | compress: {
|
39 | screw_ie8: true,
|
40 | warnings: false
|
41 | },
|
42 | mangle: {
|
43 | screw_ie8: true
|
44 | },
|
45 | output: {
|
46 | comments: false,
|
47 | screw_ie8: true
|
48 | }
|
49 | })],
|
50 | module: {
|
51 | loaders: [{
|
52 | test: /\.jsx?$/,
|
53 | loader: require.resolve('babel-loader'),
|
54 | query: require('./babel.prod.js'),
|
55 | include: _utils.includePaths,
|
56 | exclude: _utils.excludePaths
|
57 | }]
|
58 | }
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 | if (_utils.OccurenceOrderPlugin) {
|
64 | config.plugins.unshift(new _utils.OccurenceOrderPlugin());
|
65 | }
|
66 |
|
67 | exports.default = config; |
\ | No newline at end of file |