yumechi-no-kuni/webpack/plugins/index.ts
2018-02-23 02:28:55 +09:00

19 lines
341 B
TypeScript

import consts from './consts';
import hoist from './hoist';
import minify from './minify';
const env = process.env.NODE_ENV;
const isProduction = env === 'production';
export default (version, lang) => {
const plugins = [
consts(lang)
];
if (isProduction) {
plugins.push(hoist());
plugins.push(minify());
}
return plugins;
};