From 789d370b43492d84e8796d35855ea10a6bd6e816 Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Thu, 14 Nov 2024 13:06:08 +0530 Subject: [PATCH] fix: plugin import statements --- .../federatedModulesBuildPluginImports.ts | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/packages/analytics-js/src/components/pluginsManager/federatedModulesBuildPluginImports.ts b/packages/analytics-js/src/components/pluginsManager/federatedModulesBuildPluginImports.ts index a73d50433..dfefd87d5 100644 --- a/packages/analytics-js/src/components/pluginsManager/federatedModulesBuildPluginImports.ts +++ b/packages/analytics-js/src/components/pluginsManager/federatedModulesBuildPluginImports.ts @@ -3,8 +3,6 @@ import type { PluginName } from '@rudderstack/analytics-js-common/types/PluginsM import type { PluginMap } from './types'; import { pluginNamesList } from './pluginNames'; -const IMPORT_PATH_PREFIX = 'rudderAnalyticsRemotePlugins/'; - /** * Get the lazy loaded dynamic import for a plugin name */ @@ -13,31 +11,31 @@ const getFederatedModuleImport = ( ): (() => Promise) | undefined => { switch (pluginName) { case 'CustomConsentManager': - return () => import(`${IMPORT_PATH_PREFIX}CustomConsentManager`); + return () => import('rudderAnalyticsRemotePlugins/CustomConsentManager'); case 'DeviceModeDestinations': - return () => import(`${IMPORT_PATH_PREFIX}DeviceModeDestinations`); + return () => import('rudderAnalyticsRemotePlugins/DeviceModeDestinations'); case 'DeviceModeTransformation': - return () => import(`${IMPORT_PATH_PREFIX}DeviceModeTransformation`); + return () => import('rudderAnalyticsRemotePlugins/DeviceModeTransformation'); case 'ErrorReporting': - return () => import(`${IMPORT_PATH_PREFIX}ErrorReporting`); + return () => import('rudderAnalyticsRemotePlugins/ErrorReporting'); case 'ExternalAnonymousId': - return () => import(`${IMPORT_PATH_PREFIX}ExternalAnonymousId`); + return () => import('rudderAnalyticsRemotePlugins/ExternalAnonymousId'); case 'GoogleLinker': - return () => import(`${IMPORT_PATH_PREFIX}GoogleLinker`); + return () => import('rudderAnalyticsRemotePlugins/GoogleLinker'); case 'KetchConsentManager': - return () => import(`${IMPORT_PATH_PREFIX}/KetchConsentManager`); + return () => import('rudderAnalyticsRemotePlugins/KetchConsentManager'); case 'IubendaConsentManager': - return () => import(`${IMPORT_PATH_PREFIX}/IubendaConsentManager`); + return () => import('rudderAnalyticsRemotePlugins/IubendaConsentManager'); case 'NativeDestinationQueue': - return () => import(`${IMPORT_PATH_PREFIX}NativeDestinationQueue`); + return () => import('rudderAnalyticsRemotePlugins/NativeDestinationQueue'); case 'OneTrustConsentManager': - return () => import(`${IMPORT_PATH_PREFIX}OneTrustConsentManager`); + return () => import('rudderAnalyticsRemotePlugins/OneTrustConsentManager'); case 'StorageEncryption': - return () => import(`${IMPORT_PATH_PREFIX}StorageEncryption`); + return () => import('rudderAnalyticsRemotePlugins/StorageEncryption'); case 'StorageEncryptionLegacy': - return () => import(`${IMPORT_PATH_PREFIX}StorageEncryptionLegacy`); + return () => import('rudderAnalyticsRemotePlugins/StorageEncryptionLegacy'); case 'StorageMigrator': - return () => import(`${IMPORT_PATH_PREFIX}StorageMigrator`); + return () => import('rudderAnalyticsRemotePlugins/StorageMigrator'); default: return undefined; }