From f19c633f5b99a34f47b41a49ac3a0e09a2cb3b16 Mon Sep 17 00:00:00 2001 From: Mihai Blaga Date: Thu, 1 Feb 2024 16:31:56 +0200 Subject: [PATCH] reworked TS --- packages/core/src/plugins/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/plugins/index.ts b/packages/core/src/plugins/index.ts index 16a2f5e536..8ba17dab1b 100644 --- a/packages/core/src/plugins/index.ts +++ b/packages/core/src/plugins/index.ts @@ -377,9 +377,9 @@ export const parsePlugins = ( ) => { logTask('parsePlugins'); if (c.buildConfig && platform) { - let includedPlugins = getConfigProp(c, platform, 'includedPlugins'); + const includedPluginsConfig = getConfigProp(c, platform, 'includedPlugins'); // default to all plugins if it's not defined (null allowed for overrides) - if (includedPlugins === undefined) includedPlugins = ['*']; + const includedPlugins = includedPluginsConfig === undefined ? ['*'] : includedPluginsConfig; const excludedPlugins = getConfigProp(c, platform, 'excludedPlugins') || []; @@ -407,7 +407,7 @@ export const parsePlugins = ( if (!plugin) return; if ( - ((includedPlugins as string[]).includes('*') || (includedPlugins as string[]).includes(key)) && + (includedPlugins.includes('*') || includedPlugins.includes(key)) && !excludedPlugins.includes(key) ) { const pluginPlat = plugin[platform] || {};