A new isolated dynamic import system was introduced to prevent static analysis from eagerly bundling app dependencies. This ensures that app components, API handlers, and related logic are only compiled and loaded on demand at runtime, while a lightweight manifest system enables fast navigation and metadata access without triggering compilation.
/packages/app-store/appLoader.ts
– NewPurpose: Centralized dynamic import system for apps.
Key Functions:
loadAppMetadata()
– Loads app configuration without components.loadAppApiHandlers()
– Imports API handlers on demand.loadAppComponents()
– Imports React components on demand.loadApp()
– Full app loading with error handling.loadAppsBatch()
– Batch import support.loadAppFamily()
– Imports related app dependencies.Impact: Eliminates static analysis of app dependencies, preventing unnecessary compilation.
/packages/app-store/manifest.ts
– NewPurpose: Provides metadata-only access to app information.
Key Functions:
getAppManifest()
– Returns all app metadata.getAppCategories()
– Provides category data for filtering.searchApps()
– Enables lightweight text search.getAppStats()
– Supplies usage metrics.Impact: Enables app store navigation and filtering without compiling components.
/apps/web/pages/api/integrations/[...args].ts
– Modifiedimport { getAppWithMetadata } from "@calcom/app-store/server";
import { loadAppApiHandlers } from "@calcom/app-store/appLoader";
Impact: API routes now load only the relevant handlers at runtime, avoiding compilation of unrelated app code.
/apps/web/app/(use-page-wrapper)/apps/(homepage)/page.tsx
– ModifiedAppManifestEntry
→ AppFrontendPayload
.Impact: Homepage navigation and search operate entirely on manifest data, avoiding compilation of app components.
https://github.com/user-attachments/assets/f11beb7d-4c7d-4e9f-a5f2-3edaf1a57e20
/claim #23104
Vansh Gilhotra
@Vansh5632
Cal.com, Inc.
@cal