-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.build.config.js
31 lines (30 loc) · 997 Bytes
/
webpack.build.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
const merge = require('webpack-merge')
const webpack = require('webpack')
const webpackCommon = require('./webpack.common.config')
module.exports = merge(webpackCommon, {
devtool: "source-map",
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module) {
// this assumes your vendor imports exist in the
// node_modules directory
return module.context
&& module.context.indexOf('node_modules') !== -1;
}
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest'
}),
new webpack.EnvironmentPlugin({
'npm_package_version': null,
'TRAVIS_BUILD_NUMBER': null,
'TRAVIS_COMMIT': null,
'npm_package_gitHead': null
}),
new webpack.optimize.UglifyJsPlugin({
mangle: false,
sourceMap: true
})
]
})