mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-15 14:37:36 -07:00
22 lines
446 B
TypeScript
22 lines
446 B
TypeScript
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
|
|
|
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 = [
|
|
new HardSourceWebpackPlugin(),
|
|
consts(lang)
|
|
];
|
|
|
|
if (isProduction) {
|
|
plugins.push(hoist());
|
|
plugins.push(minify());
|
|
}
|
|
|
|
return plugins;
|
|
};
|