SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function defineLazyModule

    • Defines a module that is loaded on first use.

      Type Parameters

      • M

      Parameters

      • key: string

        Unique key, for example 'studio:sortDialog'.

      • loader: () => Promise<M>

        Loads the module, typically () => import('./SortDialog'). It must resolve to the module itself: after a failed fetch, the module is imported again directly from the URL the browser reported.

      • Optionaloptions: LazyModuleOptions

        Tier, prefetch, and retry options.

      Returns LazyModule<M>

      Browsers remember a failed module fetch until the page reloads. When the browser's error names the module's URL, later attempts import that URL again under a new query string, so the module loads once the network is back. Where the error does not name it (Safari), a failed module loads again only after a reload.

      const SortDialog = defineLazyModule('studio:sortDialog', () => import('./SortDialog'), { tier: 'common' });
      const { default: Dialog } = await SortDialog.load();