Skip to content

Commit d11c9bb

Browse files
committed
webpack 4.0
1 parent bca1225 commit d11c9bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

webpack/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ const path = require('path')
22
const webpack = require('webpack')
33
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
44

5+
const getMode = () =>
6+
process.env.NODE_ENV === 'production' ? 'production' : 'development'
7+
58
const output = () => ({
69
filename: 'ReactPerfDevtool.js',
710
path: path.resolve(__dirname, '../extension/build'),
@@ -36,6 +39,7 @@ module.exports = {
3639
entry: path.resolve(__dirname, '../src/index.js'),
3740
output: output(),
3841
target: 'web',
42+
mode: getMode(),
3943
externals: externals(),
4044
module: {
4145
rules: [jsLoader()]

0 commit comments

Comments
 (0)