Refactoring
This commit is contained in:
parent
e237c53766
commit
fb70e3b176
12 changed files with 202 additions and 121 deletions
19
webpack/plugins/index.ts
Normal file
19
webpack/plugins/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||
|
||||
import constant from './const';
|
||||
|
||||
const env = process.env.NODE_ENV;
|
||||
const isProduction = env === 'production';
|
||||
|
||||
export default () => {
|
||||
const plugins = [
|
||||
constant(),
|
||||
new StringReplacePlugin()
|
||||
];
|
||||
|
||||
if (isProduction) {
|
||||
//plugins.push(new webpack.optimize.UglifyJsPlugin());
|
||||
}
|
||||
|
||||
return plugins;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue