mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
Lazy components now render synchronously once their chunk is loaded and share a preload promise, so the editor no longer commits a fallback and waits out the 300ms retry throttle. Editor chunks are preloaded from the document route, the sidebar hover, and the data loader. A lint rule blocks direct imports of the editor chunk.
14 lines
453 B
TypeScript
14 lines
453 B
TypeScript
import lazyWithRetry from "~/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;
|