-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathdist.js
More file actions
37 lines (31 loc) · 925 Bytes
/
dist.js
File metadata and controls
37 lines (31 loc) · 925 Bytes
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
'use strict';
let path = require('path');
let webpack = require('webpack');
let baseConfig = require('./base');
let defaultSettings = require('./defaults');
// Add needed plugins here
let config = Object.assign({}, baseConfig.pureConfig, {
mode: 'production',
entry: path.join(__dirname, '../src/index'),
cache: false,
devtool: 'sourcemap',
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
],
module: defaultSettings.getDefaultModules()
});
// Add needed rules (loaders in Webpack 1.x) to the defaults here
config.module.rules.push({
test: /\.(js|jsx)$/,
loader: 'babel-loader',
include: [].concat(
baseConfig.extras.additionalPaths,
[ path.join(__dirname, '/../src') ]
)
});
module.exports = config;