feat: 客户端懒加载分块 — 重依赖(Univer/xterm/CodeMirror/Office)拆独立 bundle 按需下发(/sidebar/bundle 路由 + __dshChunks__ 注册表),核心启动仅 ~325KB

This commit is contained in:
Menghuan1918 committed 2026-08-12 18:19:44 +08:00
1 parent bf54a60e37
commit bab659f8bd
29 files changed
+1691 -345

No files matched your search

+6 -1
View File
@@ -12,6 +12,8 @@ if (g.self === undefined) g.self = globalThis
const elementStub = (): Record<string, unknown> => ({
style: {},
dataset: {},
textContent: '',
classList: { add: () => {}, remove: () => {}, contains: () => false },
setAttribute: () => {},
getAttribute: () => null,
@@ -32,9 +34,12 @@ if (g.document === undefined) {
removeEventListener: () => {},
defaultView: globalThis,
body: elementStub(),
// CodeMirror's view module probes the UA and injects styles at load.
// CodeMirror's view module probes the UA and injects styles at load;
// the plugin's css-inline prologue probes for existing style tags.
documentElement: elementStub(),
head: elementStub(),
querySelector: () => null,
querySelectorAll: () => [],
styleSheets: [],
}
}