mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
Moves lazyWithRetry to shared/utils so the editor's ColorSwatch and Mentions components can use it instead of React.lazy, avoiding the Suspense reveal throttle once the chunk is loaded.
14 lines
459 B
TypeScript
14 lines
459 B
TypeScript
import lazyWithRetry from "@shared/utils/lazyWithRetry";
|
|
|
|
/**
|
|
* The editor core is the largest chunk in the app and is kept out of the
|
|
* initial bundle. This module stays light so routes can preload the chunk
|
|
* without pulling editor dependencies into their own chunk.
|
|
*/
|
|
const AsyncEditor = lazyWithRetry(
|
|
// oxlint-disable-next-line no-restricted-imports -- the one place the chunk is loaded
|
|
() => import("~/editor")
|
|
);
|
|
|
|
export default AsyncEditor;
|