@burdenoff/fe-libs 2026.516.1 → 2026.518.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button/Button.d.ts +1 -1
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/chrome/AccountSwitcher.d.ts.map +1 -1
- package/dist/chrome/AutoBreadcrumbs.d.ts.map +1 -1
- package/dist/chrome/Breadcrumb.d.ts.map +1 -1
- package/dist/chrome/Breadcrumbs.d.ts.map +1 -1
- package/dist/chrome/CommandPalette.d.ts.map +1 -1
- package/dist/chrome/ContextSwitcher.d.ts.map +1 -1
- package/dist/chrome/DynamicFooter.d.ts.map +1 -1
- package/dist/chrome/Footer.d.ts.map +1 -1
- package/dist/chrome/FooterBar.d.ts +1 -1
- package/dist/chrome/FooterBar.d.ts.map +1 -1
- package/dist/chrome/GeographySwitcher.d.ts.map +1 -1
- package/dist/chrome/GlobalSearch.d.ts.map +1 -1
- package/dist/chrome/HeaderBar.d.ts +1 -1
- package/dist/chrome/HeaderBar.d.ts.map +1 -1
- package/dist/chrome/LanguagePickerSheet.d.ts.map +1 -1
- package/dist/chrome/LanguageSwitcher.d.ts.map +1 -1
- package/dist/chrome/NavLink.d.ts +1 -1
- package/dist/chrome/NavLink.d.ts.map +1 -1
- package/dist/chrome/NotificationCenter.d.ts.map +1 -1
- package/dist/chrome/NotificationCenter.js +2 -8
- package/dist/chrome/PanelContainer.d.ts +1 -1
- package/dist/chrome/PanelContainer.d.ts.map +1 -1
- package/dist/chrome/PluginContextMenuTarget.d.ts.map +1 -1
- package/dist/chrome/PluginFooterStrip.d.ts.map +1 -1
- package/dist/chrome/PluginRoutes.d.ts.map +1 -1
- package/dist/chrome/PluginSettingsPage.d.ts.map +1 -1
- package/dist/chrome/PluginToolbar.d.ts +1 -1
- package/dist/chrome/PluginToolbar.d.ts.map +1 -1
- package/dist/chrome/PluginWidgetGrid.d.ts.map +1 -1
- package/dist/chrome/ProductPickerSheet.d.ts.map +1 -1
- package/dist/chrome/ProductSideNav.d.ts.map +1 -1
- package/dist/chrome/ProductSwitcher.d.ts.map +1 -1
- package/dist/chrome/ProfileSwitcher.d.ts.map +1 -1
- package/dist/chrome/ShortcutHelpDialog.d.ts.map +1 -1
- package/dist/chrome/SideNavigation.d.ts.map +1 -1
- package/dist/chrome/Sidebar.d.ts.map +1 -1
- package/dist/chrome/StatusBar.d.ts.map +1 -1
- package/dist/chrome/Tabs.d.ts +2 -2
- package/dist/chrome/Tabs.d.ts.map +1 -1
- package/dist/chrome/index.d.ts +5 -5
- package/dist/chrome/index.d.ts.map +1 -1
- package/dist/form/Checkbox.d.ts +2 -2
- package/dist/form/Checkbox.d.ts.map +1 -1
- package/dist/form/Form.d.ts +4 -4
- package/dist/form/Form.d.ts.map +1 -1
- package/dist/form/FormDescription.d.ts +1 -1
- package/dist/form/FormDescription.d.ts.map +1 -1
- package/dist/form/FormField.d.ts +1 -1
- package/dist/form/FormField.d.ts.map +1 -1
- package/dist/form/FormLabel.d.ts +2 -2
- package/dist/form/FormMessage.d.ts +1 -1
- package/dist/form/FormMessage.d.ts.map +1 -1
- package/dist/form/Input.d.ts +1 -1
- package/dist/form/Radio.d.ts +2 -2
- package/dist/form/Radio.d.ts.map +1 -1
- package/dist/form/Select.d.ts +3 -3
- package/dist/form/Select.d.ts.map +1 -1
- package/dist/form/Textarea.d.ts +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.d.ts.map +1 -1
- package/dist/shared/components/AccessDenied.d.ts +2 -2
- package/dist/shared/components/AccessDenied.d.ts.map +1 -1
- package/dist/shared/components/AppErrorBoundary.d.ts.map +1 -1
- package/dist/shared/components/ConditionalShell.d.ts.map +1 -1
- package/dist/shared/components/ContextConversationWidget.d.ts.map +1 -1
- package/dist/shared/components/ContextConversationWidget.js +6 -23
- package/dist/shared/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/shared/components/KeyboardHelpDialogWrapper.d.ts +1 -1
- package/dist/shared/components/KeyboardHelpDialogWrapper.d.ts.map +1 -1
- package/dist/shared/components/LegalPage.d.ts.map +1 -1
- package/dist/shared/components/LoadingFallback.d.ts +1 -1
- package/dist/shared/components/LoadingFallback.d.ts.map +1 -1
- package/dist/shared/components/MicrofrontendErrorBoundary.d.ts.map +1 -1
- package/dist/shared/components/PWAInstallBanner.d.ts.map +1 -1
- package/dist/shared/components/PermissionGate.d.ts +2 -2
- package/dist/shared/components/PermissionGate.d.ts.map +1 -1
- package/dist/shared/components/ProductAccessGuard.d.ts +1 -1
- package/dist/shared/components/ProductAccessGuard.d.ts.map +1 -1
- package/dist/shared/components/QuotaMeter.d.ts.map +1 -1
- package/dist/shared/components/RequireAuth.d.ts +1 -1
- package/dist/shared/components/RequireAuth.d.ts.map +1 -1
- package/dist/shared/components/RequireAuth.js +1 -5
- package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
- package/dist/shared/components/SearchPage.d.ts.map +1 -1
- package/dist/shared/components/index.d.ts +2 -2
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/events/index.d.ts +150 -150
- package/dist/shared/events/index.d.ts.map +1 -1
- package/dist/shared/events/metadata.d.ts.map +1 -1
- package/dist/shared/events/sinks/BackendAuditSink.d.ts.map +1 -1
- package/dist/shared/events/sinks/RybbitSink.d.ts.map +1 -1
- package/dist/shared/events/sinks/RybbitSink.js +1 -1
- package/dist/shared/feature-flags/FeatureFlagProvider.d.ts.map +1 -1
- package/dist/shared/feature-flags/index.d.ts +1 -1
- package/dist/shared/feature-flags/index.d.ts.map +1 -1
- package/dist/shared/feature-flags/types.d.ts +3 -3
- package/dist/shared/feature-flags/types.d.ts.map +1 -1
- package/dist/shared/feature-flags/useFeatureFlag.d.ts.map +1 -1
- package/dist/shared/geography/GeographyProvider.d.ts.map +1 -1
- package/dist/shared/geography/countries.d.ts +3 -3
- package/dist/shared/geography/countries.d.ts.map +1 -1
- package/dist/shared/geography/index.d.ts +1 -1
- package/dist/shared/geography/index.d.ts.map +1 -1
- package/dist/shared/graphql/GatewayContext.d.ts.map +1 -1
- package/dist/shared/graphql/client.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.d.ts.map +1 -1
- package/dist/shared/graphql/index.d.ts +1 -1
- package/dist/shared/graphql/index.d.ts.map +1 -1
- package/dist/shared/graphql/links/sse-link.d.ts.map +1 -1
- package/dist/shared/graphql/security.d.ts.map +1 -1
- package/dist/shared/graphql/workspaceToken.d.ts.map +1 -1
- package/dist/shared/help/HelpButton.d.ts +1 -1
- package/dist/shared/help/HelpButton.d.ts.map +1 -1
- package/dist/shared/help/HelpPanel.d.ts.map +1 -1
- package/dist/shared/help/HelpProvider.d.ts +2 -2
- package/dist/shared/help/HelpProvider.d.ts.map +1 -1
- package/dist/shared/help/index.d.ts +1 -1
- package/dist/shared/help/index.d.ts.map +1 -1
- package/dist/shared/help/types.d.ts +3 -3
- package/dist/shared/hooks/index.d.ts +4 -4
- package/dist/shared/hooks/index.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useBreadcrumbs.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useFooterRegistry.d.ts +3 -3
- package/dist/shared/hooks/shell/useFooterRegistry.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useGlobalSearch.d.ts +3 -3
- package/dist/shared/hooks/shell/useGlobalSearch.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useLanguages.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useLanguages.js +1 -5
- package/dist/shared/hooks/shell/useProductAccess.d.ts +2 -2
- package/dist/shared/hooks/shell/useProductAccess.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useProducts.d.ts.map +1 -1
- package/dist/shared/hooks/useAsync.d.ts.map +1 -1
- package/dist/shared/hooks/useBreakpoint.d.ts +2 -2
- package/dist/shared/hooks/useBreakpoint.d.ts.map +1 -1
- package/dist/shared/hooks/useCopyToClipboard.d.ts.map +1 -1
- package/dist/shared/hooks/useKeyPress.d.ts.map +1 -1
- package/dist/shared/hooks/useLocalStorage.d.ts.map +1 -1
- package/dist/shared/hooks/usePWA.d.ts.map +1 -1
- package/dist/shared/hooks/useQuotaErrorToast.d.ts.map +1 -1
- package/dist/shared/hooks/useReferralAttribution.d.ts.map +1 -1
- package/dist/shared/hooks/useSessionStorage.d.ts.map +1 -1
- package/dist/shared/keyboard/globalShortcuts.d.ts.map +1 -1
- package/dist/shared/keyboard/index.d.ts +1 -1
- package/dist/shared/keyboard/index.d.ts.map +1 -1
- package/dist/shared/keyboard/types.d.ts +2 -2
- package/dist/shared/keyboard/useKeyboardShortcuts.d.ts +2 -2
- package/dist/shared/keyboard/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/shared/keyboard/utils.d.ts.map +1 -1
- package/dist/shared/logger/ConsoleTransport.d.ts.map +1 -1
- package/dist/shared/logger/LogManager.d.ts.map +1 -1
- package/dist/shared/logger/Logger.d.ts.map +1 -1
- package/dist/shared/motion/AnimatedCounter.d.ts.map +1 -1
- package/dist/shared/motion/MotionCard.d.ts.map +1 -1
- package/dist/shared/motion/MotionCollapse.d.ts +1 -1
- package/dist/shared/motion/MotionCollapse.d.ts.map +1 -1
- package/dist/shared/motion/MotionFade.d.ts +2 -2
- package/dist/shared/motion/MotionFade.d.ts.map +1 -1
- package/dist/shared/motion/MotionItem.d.ts +1 -1
- package/dist/shared/motion/MotionItem.d.ts.map +1 -1
- package/dist/shared/motion/MotionList.d.ts.map +1 -1
- package/dist/shared/motion/MotionPage.d.ts +1 -1
- package/dist/shared/motion/MotionPage.d.ts.map +1 -1
- package/dist/shared/native/consumers.d.ts.map +1 -1
- package/dist/shared/native/types.d.ts +6 -6
- package/dist/shared/pages/AiPage.d.ts.map +1 -1
- package/dist/shared/pages/LegalPage.d.ts.map +1 -1
- package/dist/shared/pages/SearchPage.d.ts.map +1 -1
- package/dist/shared/pages/SearchPage.js +2 -4
- package/dist/shared/plugins/PluginRuntimeProvider.d.ts +1 -1
- package/dist/shared/plugins/PluginRuntimeProvider.d.ts.map +1 -1
- package/dist/shared/plugins/context.d.ts +2 -2
- package/dist/shared/plugins/context.d.ts.map +1 -1
- package/dist/shared/plugins/event-bus.d.ts +20 -20
- package/dist/shared/plugins/event-bus.d.ts.map +1 -1
- package/dist/shared/plugins/panels/usePanelManagerStore.d.ts +1 -1
- package/dist/shared/plugins/registries/useCommandRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useContextMenuRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/usePanelRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useRouteRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useSettingsRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useStatusBarRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useToolbarRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/registries/useWidgetRegistry.d.ts.map +1 -1
- package/dist/shared/plugins/runtime.d.ts.map +1 -1
- package/dist/shared/plugins/types.d.ts +12 -12
- package/dist/shared/plugins/types.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.d.ts +4 -4
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +2 -8
- package/dist/shared/providers/MicrofrontendProvider.d.ts +1 -1
- package/dist/shared/providers/MicrofrontendProvider.d.ts.map +1 -1
- package/dist/shared/providers/index.d.ts +1 -1
- package/dist/shared/providers/index.d.ts.map +1 -1
- package/dist/shared/providers/shell/ActiveContextProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ActiveContextStorage.d.ts +1 -1
- package/dist/shared/providers/shell/ActiveContextStorage.d.ts.map +1 -1
- package/dist/shared/providers/shell/AppShellContext.d.ts.map +1 -1
- package/dist/shared/providers/shell/AuthBridgeClient.d.ts +2 -2
- package/dist/shared/providers/shell/AuthBridgeClient.d.ts.map +1 -1
- package/dist/shared/providers/shell/AuthProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/AuthTokenProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ContextManagerProvider.d.ts +1 -1
- package/dist/shared/providers/shell/ContextManagerProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/FeatureFlagsProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/GatewayRouter.d.ts +1 -1
- package/dist/shared/providers/shell/GatewayRouter.d.ts.map +1 -1
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts +3 -3
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/I18nProvider.d.ts +1 -1
- package/dist/shared/providers/shell/I18nProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/PageConversationContextProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/PermissionProvider.d.ts +2 -2
- package/dist/shared/providers/shell/PermissionProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileGeographyBridge.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts.map +1 -1
- package/dist/shared/providers/shell/ShellUiProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -6
- package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/index.d.ts +10 -10
- package/dist/shared/providers/shell/index.d.ts.map +1 -1
- package/dist/shared/shims/assert.d.ts.map +1 -1
- package/dist/shared/shims/use-sync-external-store-with-selector.d.ts.map +1 -1
- package/dist/shared/shims/util.d.ts.map +1 -1
- package/dist/shared/tours/TourPlayer.d.ts +1 -1
- package/dist/shared/tours/TourPlayer.d.ts.map +1 -1
- package/dist/shared/tours/TourPlayerProvider.d.ts.map +1 -1
- package/dist/shared/tours/TourSpotlight.d.ts.map +1 -1
- package/dist/shared/tours/TourTooltip.d.ts.map +1 -1
- package/dist/shared/tours/TourTrigger.d.ts +3 -3
- package/dist/shared/tours/TourTrigger.d.ts.map +1 -1
- package/dist/shared/tours/ToursContext.d.ts +2 -2
- package/dist/shared/tours/ToursContext.d.ts.map +1 -1
- package/dist/shared/tours/routeCatalog.d.ts.map +1 -1
- package/dist/shared/tours/types.d.ts +7 -7
- package/dist/shared/tours/types.d.ts.map +1 -1
- package/dist/shared/tours/useTourPlayer.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +4 -4
- package/dist/shared/utils/apollo.d.ts.map +1 -1
- package/dist/shared/utils/appHelpers.d.ts.map +1 -1
- package/dist/shared/utils/authCookie.d.ts.map +1 -1
- package/dist/shared/utils/authErrorHandling.d.ts.map +1 -1
- package/dist/shared/utils/format.d.ts +1 -1
- package/dist/shared/utils/format.d.ts.map +1 -1
- package/dist/shared/utils/gatewayFetchRewrite.d.ts.map +1 -1
- package/dist/shared/utils/index.d.ts +3 -3
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/loggerInit.d.ts.map +1 -1
- package/dist/shared/utils/quotaErrors.d.ts.map +1 -1
- package/dist/shared/utils/tokens.d.ts +3 -3
- package/dist/shared/utils/tokens.d.ts.map +1 -1
- package/dist/storage/StorageFolderPicker.d.ts.map +1 -1
- package/dist/tag/TagBadge.d.ts +1 -1
- package/dist/tag/TagBadge.d.ts.map +1 -1
- package/dist/tag/TagsWidget.d.ts.map +1 -1
- package/dist/tag/TagsWidget.js +1 -5
- package/dist/ui/accordion.d.ts +2 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/alert-dialog.d.ts +4 -4
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -2
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/dialog.d.ts +4 -4
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/popover.d.ts +2 -2
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/scroll-area.d.ts +2 -2
- package/dist/ui/scroll-area.d.ts.map +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/separator.d.ts +2 -2
- package/dist/ui/sheet.d.ts +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/spinner.d.ts +1 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/table.d.ts +1 -1
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/tabs.d.ts +2 -2
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/shims/assert.ts +6 -14
- package/src/shared/shims/index.ts +5 -5
- package/src/shared/shims/process.ts +2 -2
- package/src/shared/shims/use-sync-external-store-shim.ts +1 -1
- package/src/shared/shims/use-sync-external-store-with-selector.ts +4 -16
- package/src/shared/shims/util.ts +38 -59
- package/src/vite/index.ts +5 -5
- package/src/vite/mfe.config.ts +28 -37
- package/src/vite/plugins.ts +76 -116
- package/src/vite/shell.config.ts +55 -68
- package/src/vite/types.ts +34 -34
package/src/vite/mfe.config.ts
CHANGED
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { defineConfig, type UserConfig, type Plugin } from
|
|
27
|
-
import react from
|
|
28
|
-
import dts from
|
|
29
|
-
import { resolve, dirname } from
|
|
30
|
-
import { fileURLToPath } from
|
|
26
|
+
import { defineConfig, type UserConfig, type Plugin } from 'vite';
|
|
27
|
+
import react from '@vitejs/plugin-react';
|
|
28
|
+
import dts from 'vite-plugin-dts';
|
|
29
|
+
import { resolve, dirname } from 'path';
|
|
30
|
+
import { fileURLToPath } from 'url';
|
|
31
31
|
import {
|
|
32
32
|
type MicrofrontendConfig,
|
|
33
33
|
STANDARD_MFE_EXTERNALS,
|
|
34
34
|
STANDARD_WATCH_IGNORE,
|
|
35
35
|
MFE_PORT_MAP,
|
|
36
|
-
} from
|
|
37
|
-
import { createContextualAliasPlugin } from
|
|
36
|
+
} from './types';
|
|
37
|
+
import { createContextualAliasPlugin } from './plugins';
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Creates a standardized Vite configuration for microfrontends.
|
|
@@ -45,11 +45,11 @@ import { createContextualAliasPlugin } from "./plugins";
|
|
|
45
45
|
*/
|
|
46
46
|
export function createMicrofrontendConfig(
|
|
47
47
|
config: MicrofrontendConfig,
|
|
48
|
-
configPath: string
|
|
48
|
+
configPath: string
|
|
49
49
|
): UserConfig {
|
|
50
50
|
// Resolve __dirname from the config file path
|
|
51
51
|
const __dirname =
|
|
52
|
-
typeof configPath ===
|
|
52
|
+
typeof configPath === 'string' && configPath.startsWith('file://')
|
|
53
53
|
? dirname(fileURLToPath(configPath))
|
|
54
54
|
: configPath;
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ export function createMicrofrontendConfig(
|
|
|
57
57
|
name,
|
|
58
58
|
port = MFE_PORT_MAP[name] || 5100,
|
|
59
59
|
entry = `${name}/index.ts`,
|
|
60
|
-
feLibsPath =
|
|
60
|
+
feLibsPath = '../../fe-libs/src',
|
|
61
61
|
additionalExternals = [],
|
|
62
62
|
additionalAliases = {},
|
|
63
63
|
additionalPlugins = [],
|
|
@@ -65,13 +65,11 @@ export function createMicrofrontendConfig(
|
|
|
65
65
|
} = config;
|
|
66
66
|
|
|
67
67
|
const resolvedFeLibsPath = resolve(__dirname, feLibsPath);
|
|
68
|
-
const srcPath = resolve(__dirname,
|
|
68
|
+
const srcPath = resolve(__dirname, './src');
|
|
69
69
|
|
|
70
70
|
// Build external array including regex patterns
|
|
71
71
|
const externals: (string | RegExp)[] = [
|
|
72
|
-
...STANDARD_MFE_EXTERNALS.filter(
|
|
73
|
-
(ext): ext is string => typeof ext === "string",
|
|
74
|
-
),
|
|
72
|
+
...STANDARD_MFE_EXTERNALS.filter((ext): ext is string => typeof ext === 'string'),
|
|
75
73
|
...additionalExternals,
|
|
76
74
|
// Include regex patterns
|
|
77
75
|
/^@burdenoff\/fe-libs\/.*/,
|
|
@@ -95,8 +93,8 @@ export function createMicrofrontendConfig(
|
|
|
95
93
|
strictPort: true,
|
|
96
94
|
headers: {
|
|
97
95
|
// Required for OAuth popup flows and SharedArrayBuffer
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
'Cross-Origin-Opener-Policy': 'same-origin-allow-popups',
|
|
97
|
+
'Cross-Origin-Embedder-Policy': 'unsafe-none',
|
|
100
98
|
},
|
|
101
99
|
watch: {
|
|
102
100
|
ignored: [...STANDARD_WATCH_IGNORE],
|
|
@@ -109,7 +107,7 @@ export function createMicrofrontendConfig(
|
|
|
109
107
|
entry: {
|
|
110
108
|
[name]: resolve(__dirname, `src/${entry}`),
|
|
111
109
|
},
|
|
112
|
-
formats: [
|
|
110
|
+
formats: ['es'],
|
|
113
111
|
},
|
|
114
112
|
|
|
115
113
|
// Rolldown options (Vite 8 uses Rolldown instead of Rollup)
|
|
@@ -118,10 +116,10 @@ export function createMicrofrontendConfig(
|
|
|
118
116
|
output: {
|
|
119
117
|
// Preserve module structure for optimal tree-shaking
|
|
120
118
|
preserveModules: true,
|
|
121
|
-
preserveModulesRoot:
|
|
119
|
+
preserveModulesRoot: 'src',
|
|
122
120
|
// Consistent file naming
|
|
123
|
-
entryFileNames:
|
|
124
|
-
chunkFileNames:
|
|
121
|
+
entryFileNames: '[name].js',
|
|
122
|
+
chunkFileNames: 'chunks/[name].js',
|
|
125
123
|
},
|
|
126
124
|
},
|
|
127
125
|
|
|
@@ -137,37 +135,30 @@ export function createMicrofrontendConfig(
|
|
|
137
135
|
|
|
138
136
|
resolve: {
|
|
139
137
|
alias: {
|
|
140
|
-
|
|
138
|
+
'@burdenoff/fe-libs': resolvedFeLibsPath,
|
|
141
139
|
...additionalAliases,
|
|
142
140
|
},
|
|
143
141
|
// Ensure consistent dependency resolution
|
|
144
|
-
dedupe: [
|
|
145
|
-
"react",
|
|
146
|
-
"react-dom",
|
|
147
|
-
"react-router-dom",
|
|
148
|
-
"@apollo/client",
|
|
149
|
-
"graphql",
|
|
150
|
-
"zustand",
|
|
151
|
-
],
|
|
142
|
+
dedupe: ['react', 'react-dom', 'react-router-dom', '@apollo/client', 'graphql', 'zustand'],
|
|
152
143
|
},
|
|
153
144
|
|
|
154
145
|
// Vite 8 uses Oxc for transforms instead of esbuild
|
|
155
146
|
oxc: {
|
|
156
147
|
jsx: {
|
|
157
|
-
runtime:
|
|
148
|
+
runtime: 'automatic',
|
|
158
149
|
},
|
|
159
150
|
},
|
|
160
151
|
|
|
161
152
|
// Optimize dependencies for faster dev startup
|
|
162
153
|
optimizeDeps: {
|
|
163
154
|
include: [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
'react',
|
|
156
|
+
'react-dom',
|
|
157
|
+
'react-router-dom',
|
|
158
|
+
'@apollo/client',
|
|
159
|
+
'graphql',
|
|
160
|
+
'lucide-react',
|
|
161
|
+
'zustand',
|
|
171
162
|
],
|
|
172
163
|
},
|
|
173
164
|
}) as UserConfig;
|
package/src/vite/plugins.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* @version Vite 8.0.0-beta.8+
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Plugin } from
|
|
9
|
-
import { resolve } from
|
|
8
|
+
import type { Plugin } from 'vite';
|
|
9
|
+
import { resolve } from 'path';
|
|
10
10
|
|
|
11
11
|
interface ContextualAliasOptions {
|
|
12
12
|
/** Path to fe-libs/src */
|
|
@@ -35,18 +35,16 @@ interface ContextualAliasOptions {
|
|
|
35
35
|
* ]
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export function createContextualAliasPlugin(
|
|
39
|
-
options: ContextualAliasOptions,
|
|
40
|
-
): Plugin {
|
|
38
|
+
export function createContextualAliasPlugin(options: ContextualAliasOptions): Plugin {
|
|
41
39
|
const { feLibsPath, srcPath, microfePaths = {} } = options;
|
|
42
40
|
|
|
43
41
|
return {
|
|
44
|
-
name:
|
|
45
|
-
enforce:
|
|
42
|
+
name: 'burdenoff:contextual-alias',
|
|
43
|
+
enforce: 'pre',
|
|
46
44
|
|
|
47
45
|
async resolveId(source, importer, resolveOptions) {
|
|
48
46
|
// Only handle @/ imports
|
|
49
|
-
if (!source.startsWith(
|
|
47
|
+
if (!source.startsWith('@/')) {
|
|
50
48
|
return null;
|
|
51
49
|
}
|
|
52
50
|
|
|
@@ -59,7 +57,7 @@ export function createContextualAliasPlugin(
|
|
|
59
57
|
let basePath: string;
|
|
60
58
|
|
|
61
59
|
// Determine base path based on importer location
|
|
62
|
-
if (importer.includes(
|
|
60
|
+
if (importer.includes('fe-libs')) {
|
|
63
61
|
// Importer is from fe-libs, resolve to fe-libs/src
|
|
64
62
|
basePath = feLibsPath;
|
|
65
63
|
} else {
|
|
@@ -103,14 +101,14 @@ export function createContextualAliasPlugin(
|
|
|
103
101
|
*/
|
|
104
102
|
export function createAdaptiveExpressionsFix(): Plugin {
|
|
105
103
|
return {
|
|
106
|
-
name:
|
|
107
|
-
enforce:
|
|
104
|
+
name: 'burdenoff:adaptive-expressions-fix',
|
|
105
|
+
enforce: 'pre',
|
|
108
106
|
|
|
109
107
|
resolveId(source) {
|
|
110
108
|
// Force correct resolution for adaptive-expressions
|
|
111
|
-
if (source ===
|
|
109
|
+
if (source === 'adaptive-expressions') {
|
|
112
110
|
return {
|
|
113
|
-
id:
|
|
111
|
+
id: 'adaptive-expressions/lib/index.js',
|
|
114
112
|
external: false,
|
|
115
113
|
};
|
|
116
114
|
}
|
|
@@ -130,15 +128,13 @@ export function createAdaptiveExpressionsFix(): Plugin {
|
|
|
130
128
|
* plugins: [createReactSingletonPlugin(resolve(__dirname, 'node_modules'))]
|
|
131
129
|
* ```
|
|
132
130
|
*/
|
|
133
|
-
export function createReactSingletonAliases(
|
|
134
|
-
nodeModulesPath: string,
|
|
135
|
-
): Record<string, string> {
|
|
131
|
+
export function createReactSingletonAliases(nodeModulesPath: string): Record<string, string> {
|
|
136
132
|
return {
|
|
137
|
-
react: resolve(nodeModulesPath,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
133
|
+
react: resolve(nodeModulesPath, 'react'),
|
|
134
|
+
'react-dom': resolve(nodeModulesPath, 'react-dom'),
|
|
135
|
+
'react-dom/client': resolve(nodeModulesPath, 'react-dom/client'),
|
|
136
|
+
'react/jsx-runtime': resolve(nodeModulesPath, 'react/jsx-runtime'),
|
|
137
|
+
'react/jsx-dev-runtime': resolve(nodeModulesPath, 'react/jsx-dev-runtime'),
|
|
142
138
|
};
|
|
143
139
|
}
|
|
144
140
|
|
|
@@ -151,40 +147,31 @@ export function createReactSingletonAliases(
|
|
|
151
147
|
*/
|
|
152
148
|
export function createNodeShimAliases(
|
|
153
149
|
feLibsShimsPath: string,
|
|
154
|
-
srcPath?: string
|
|
150
|
+
srcPath?: string
|
|
155
151
|
): Record<string, string> {
|
|
156
152
|
const shimsPath = srcPath ?? feLibsShimsPath;
|
|
157
153
|
return {
|
|
158
|
-
assert: resolve(feLibsShimsPath,
|
|
159
|
-
util: resolve(feLibsShimsPath,
|
|
160
|
-
process: resolve(feLibsShimsPath,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"use-sync-external-store/shim/index": resolve(
|
|
166
|
-
shimsPath,
|
|
167
|
-
"use-sync-external-store-shim.ts",
|
|
168
|
-
),
|
|
169
|
-
"use-sync-external-store/shim/index.js": resolve(
|
|
154
|
+
assert: resolve(feLibsShimsPath, 'assert.ts'),
|
|
155
|
+
util: resolve(feLibsShimsPath, 'util.ts'),
|
|
156
|
+
process: resolve(feLibsShimsPath, 'process.ts'),
|
|
157
|
+
'use-sync-external-store/shim': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
158
|
+
'use-sync-external-store/shim/index': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
159
|
+
'use-sync-external-store/shim/index.js': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
160
|
+
'use-sync-external-store/with-selector': resolve(
|
|
170
161
|
shimsPath,
|
|
171
|
-
|
|
162
|
+
'use-sync-external-store-with-selector.ts'
|
|
172
163
|
),
|
|
173
|
-
|
|
164
|
+
'use-sync-external-store/with-selector.js': resolve(
|
|
174
165
|
shimsPath,
|
|
175
|
-
|
|
166
|
+
'use-sync-external-store-with-selector.ts'
|
|
176
167
|
),
|
|
177
|
-
|
|
168
|
+
'use-sync-external-store/shim/with-selector': resolve(
|
|
178
169
|
shimsPath,
|
|
179
|
-
|
|
170
|
+
'use-sync-external-store-with-selector.ts'
|
|
180
171
|
),
|
|
181
|
-
|
|
172
|
+
'use-sync-external-store/shim/with-selector.js': resolve(
|
|
182
173
|
shimsPath,
|
|
183
|
-
|
|
184
|
-
),
|
|
185
|
-
"use-sync-external-store/shim/with-selector.js": resolve(
|
|
186
|
-
shimsPath,
|
|
187
|
-
"use-sync-external-store-with-selector.ts",
|
|
174
|
+
'use-sync-external-store-with-selector.ts'
|
|
188
175
|
),
|
|
189
176
|
};
|
|
190
177
|
}
|
|
@@ -196,68 +183,41 @@ export function createNodeShimAliases(
|
|
|
196
183
|
* @param nodeModulesPath - Path to the app's node_modules
|
|
197
184
|
* @param shimsPath - Path to the shims directory for use-sync-external-store
|
|
198
185
|
*/
|
|
199
|
-
export function createZustandEsmPlugin(
|
|
200
|
-
nodeModulesPath: string,
|
|
201
|
-
shimsPath: string,
|
|
202
|
-
): Plugin {
|
|
186
|
+
export function createZustandEsmPlugin(nodeModulesPath: string, shimsPath: string): Plugin {
|
|
203
187
|
const zustandEsmMap: Record<string, string> = {
|
|
204
|
-
zustand: resolve(nodeModulesPath,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
),
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
"zustand/esm/vanilla/shallow.mjs",
|
|
218
|
-
),
|
|
219
|
-
"zustand/react": resolve(nodeModulesPath, "zustand/esm/react.mjs"),
|
|
220
|
-
"zustand/react/shallow": resolve(
|
|
221
|
-
nodeModulesPath,
|
|
222
|
-
"zustand/esm/react/shallow.mjs",
|
|
223
|
-
),
|
|
224
|
-
"zustand/traditional": resolve(
|
|
225
|
-
nodeModulesPath,
|
|
226
|
-
"zustand/esm/traditional.mjs",
|
|
227
|
-
),
|
|
228
|
-
"use-sync-external-store/shim": resolve(
|
|
229
|
-
shimsPath,
|
|
230
|
-
"use-sync-external-store-shim.ts",
|
|
231
|
-
),
|
|
232
|
-
"use-sync-external-store/shim/index": resolve(
|
|
233
|
-
shimsPath,
|
|
234
|
-
"use-sync-external-store-shim.ts",
|
|
235
|
-
),
|
|
236
|
-
"use-sync-external-store/shim/index.js": resolve(
|
|
237
|
-
shimsPath,
|
|
238
|
-
"use-sync-external-store-shim.ts",
|
|
239
|
-
),
|
|
240
|
-
"use-sync-external-store/with-selector": resolve(
|
|
188
|
+
zustand: resolve(nodeModulesPath, 'zustand/esm/index.mjs'),
|
|
189
|
+
'zustand/vanilla': resolve(nodeModulesPath, 'zustand/esm/vanilla.mjs'),
|
|
190
|
+
'zustand/middleware': resolve(nodeModulesPath, 'zustand/esm/middleware.mjs'),
|
|
191
|
+
'zustand/middleware/immer': resolve(nodeModulesPath, 'zustand/esm/middleware/immer.mjs'),
|
|
192
|
+
'zustand/shallow': resolve(nodeModulesPath, 'zustand/esm/shallow.mjs'),
|
|
193
|
+
'zustand/vanilla/shallow': resolve(nodeModulesPath, 'zustand/esm/vanilla/shallow.mjs'),
|
|
194
|
+
'zustand/react': resolve(nodeModulesPath, 'zustand/esm/react.mjs'),
|
|
195
|
+
'zustand/react/shallow': resolve(nodeModulesPath, 'zustand/esm/react/shallow.mjs'),
|
|
196
|
+
'zustand/traditional': resolve(nodeModulesPath, 'zustand/esm/traditional.mjs'),
|
|
197
|
+
'use-sync-external-store/shim': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
198
|
+
'use-sync-external-store/shim/index': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
199
|
+
'use-sync-external-store/shim/index.js': resolve(shimsPath, 'use-sync-external-store-shim.ts'),
|
|
200
|
+
'use-sync-external-store/with-selector': resolve(
|
|
241
201
|
shimsPath,
|
|
242
|
-
|
|
202
|
+
'use-sync-external-store-with-selector.ts'
|
|
243
203
|
),
|
|
244
|
-
|
|
204
|
+
'use-sync-external-store/with-selector.js': resolve(
|
|
245
205
|
shimsPath,
|
|
246
|
-
|
|
206
|
+
'use-sync-external-store-with-selector.ts'
|
|
247
207
|
),
|
|
248
|
-
|
|
208
|
+
'use-sync-external-store/shim/with-selector': resolve(
|
|
249
209
|
shimsPath,
|
|
250
|
-
|
|
210
|
+
'use-sync-external-store-with-selector.ts'
|
|
251
211
|
),
|
|
252
|
-
|
|
212
|
+
'use-sync-external-store/shim/with-selector.js': resolve(
|
|
253
213
|
shimsPath,
|
|
254
|
-
|
|
214
|
+
'use-sync-external-store-with-selector.ts'
|
|
255
215
|
),
|
|
256
216
|
};
|
|
257
217
|
|
|
258
218
|
return {
|
|
259
|
-
name:
|
|
260
|
-
enforce:
|
|
219
|
+
name: 'burdenoff:zustand-esm',
|
|
220
|
+
enforce: 'pre',
|
|
261
221
|
resolveId(source) {
|
|
262
222
|
if (source in zustandEsmMap) {
|
|
263
223
|
return zustandEsmMap[source];
|
|
@@ -273,39 +233,39 @@ export function createZustandEsmPlugin(
|
|
|
273
233
|
*/
|
|
274
234
|
export function createManualChunks(id: string): string | undefined {
|
|
275
235
|
if (
|
|
276
|
-
id.includes(
|
|
277
|
-
id.includes(
|
|
278
|
-
id.includes(
|
|
279
|
-
id.includes(
|
|
236
|
+
id.includes('node_modules/react-dom') ||
|
|
237
|
+
id.includes('node_modules/react/') ||
|
|
238
|
+
id.includes('node_modules/react-router') ||
|
|
239
|
+
id.includes('node_modules/react-error-boundary')
|
|
280
240
|
) {
|
|
281
|
-
return
|
|
241
|
+
return 'vendor-react';
|
|
282
242
|
}
|
|
283
243
|
if (
|
|
284
|
-
id.includes(
|
|
285
|
-
id.includes(
|
|
286
|
-
id.includes(
|
|
244
|
+
id.includes('node_modules/@apollo/client') ||
|
|
245
|
+
id.includes('node_modules/graphql') ||
|
|
246
|
+
id.includes('node_modules/graphql-ws')
|
|
287
247
|
) {
|
|
288
|
-
return
|
|
248
|
+
return 'vendor-apollo';
|
|
289
249
|
}
|
|
290
250
|
if (
|
|
291
|
-
id.includes(
|
|
292
|
-
id.includes(
|
|
293
|
-
id.includes(
|
|
251
|
+
id.includes('node_modules/lucide-react') ||
|
|
252
|
+
id.includes('node_modules/sonner') ||
|
|
253
|
+
id.includes('node_modules/cmdk')
|
|
294
254
|
) {
|
|
295
|
-
return
|
|
255
|
+
return 'vendor-ui';
|
|
296
256
|
}
|
|
297
|
-
if (id.includes(
|
|
298
|
-
return
|
|
257
|
+
if (id.includes('node_modules/@radix-ui')) {
|
|
258
|
+
return 'vendor-radix';
|
|
299
259
|
}
|
|
300
260
|
if (
|
|
301
|
-
id.includes(
|
|
302
|
-
id.includes(
|
|
303
|
-
id.includes(
|
|
261
|
+
id.includes('node_modules/react-hook-form') ||
|
|
262
|
+
id.includes('node_modules/@hookform') ||
|
|
263
|
+
id.includes('node_modules/zod')
|
|
304
264
|
) {
|
|
305
|
-
return
|
|
265
|
+
return 'vendor-forms';
|
|
306
266
|
}
|
|
307
|
-
if (id.includes(
|
|
308
|
-
return
|
|
267
|
+
if (id.includes('node_modules/date-fns')) {
|
|
268
|
+
return 'vendor-datefns';
|
|
309
269
|
}
|
|
310
270
|
return undefined;
|
|
311
271
|
}
|