mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
refactor(webpack): drop custom flavor helper & explicitly set in each config
This commit is contained in:

committed by
Nathan Walker

parent
5452b89735
commit
3bdc34aec3
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user