Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): split image font coverage tables from the editor bundle

tianma-if054a93f4ae93
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index 494e3fc4..40f2f100 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -311,6 +311,13 @@ export default defineConfig({
strictExecutionOrder: true,
codeSplitting: {
groups: [
+ {
+ // Font coverage tables are static data used by image sharing.
+ // Keep them out of the editor component's JavaScript chunk.
+ name: "note-image-font-manifest",
+ test: /[\\/]note-image-font-manifest\.ts$/,
+ priority: 51,
+ },
{
name: "vendor-code-highlight",
test: /node_modules[\\/](?:lowlight|highlight\.js)[\\/]/,
diff --git a/scripts/verify-web-performance.mjs b/scripts/verify-web-performance.mjs
index b4b8c200..40b1c3fe 100644
--- a/scripts/verify-web-performance.mjs
+++ b/scripts/verify-web-performance.mjs
@@ -52,9 +52,9 @@ const allowedLargeChunkPattern = /^(?:vendor-(?:code-highlight|beautiful-mermaid
// while retaining the initial preload budget and the checks below.
const boundedDeferredChunks = [
{ pattern: /^vendor~mathlive-loader-.*\.js$/, maxBytes: 850 * 1024 },
- // Notebook publishing and share management bring the deferred catalog to
- // ~551 KiB. Keep a bounded allowance without changing the preload budget.
- { pattern: /^i18n-ja-.*\.js$/, maxBytes: 560 * 1024 },
+ // Notebook publishing, sharing and font feedback bring the deferred catalog
+ // to ~563 KiB. Keep a bounded allowance without changing the preload budget.
+ { pattern: /^i18n-ja-.*\.js$/, maxBytes: 570 * 1024 },
];
const allowedLargeChunk = ({ name, size }) =>
allowedLargeChunkPattern.test(name) ||