blob: cbffbad4e0d577fa73d5f6f49c6109ebe314caa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const StringReplacePlugin = require('string-replace-webpack-plugin');
import constant from './const';
import minify from './minify';
const env = process.env.NODE_ENV;
const isProduction = env === 'production';
export default () => {
const plugins = [
constant(),
new StringReplacePlugin()
];
if (isProduction) {
plugins.push(minify());
}
return plugins;
};
|