wip
This commit is contained in:
parent
acfa2ef028
commit
58a6e647b3
12 changed files with 50 additions and 73 deletions
|
@ -1,17 +1,16 @@
|
|||
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||
|
||||
import consts from './consts';
|
||||
import hoist from './hoist';
|
||||
import minify from './minify';
|
||||
import banner from './banner';
|
||||
|
||||
const env = process.env.NODE_ENV;
|
||||
const isProduction = env === 'production';
|
||||
|
||||
export default (version, lang) => {
|
||||
const plugins = [
|
||||
consts(lang),
|
||||
new StringReplacePlugin()
|
||||
new HardSourceWebpackPlugin(),
|
||||
consts(lang)
|
||||
];
|
||||
|
||||
if (isProduction) {
|
||||
|
@ -19,7 +18,5 @@ export default (version, lang) => {
|
|||
plugins.push(minify());
|
||||
}
|
||||
|
||||
plugins.push(banner(version));
|
||||
|
||||
return plugins;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue