refactor(webpack): drop custom flavor helper & explicitly set in each config

This commit is contained in:
Igor Randjelovic
2021-08-29 18:08:05 +02:00
committed by Nathan Walker
parent 5452b89735
commit 3bdc34aec3
15 changed files with 63 additions and 17 deletions

View File

@ -1,11 +1,12 @@
import { merge } from 'webpack-merge';
import Config from 'webpack-chain';
import { getProjectFilePath } from '../helpers/project';
import { hasDependency } from '../helpers/dependencies';
import { getPlatformName } from '../helpers/platform';
import { env as _env, IWebpackEnv } from '../index';
import { error } from '../helpers/log';
import base from './base';
import { hasDependency } from '../helpers/dependencies';
export default function (config: Config, env: IWebpackEnv = _env): Config {
base(config, env);
@ -84,6 +85,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
});
}
config.plugin('DefinePlugin').tap((args) => {
args[0] = merge(args[0], {
__UI_USE_EXTERNAL_RENDERER__: true,
});
return args;
});
return config;
}