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): prebundle Fabric for poster creation

tianma-if527b20b1cd20
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index 40e8f9ec..80114b54 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -124,6 +124,11 @@ self.addEventListener("activate", (event) => {
export default defineConfig({
root: "apps/web",
+ // Poster creation loads Fabric through a lazy module. Prepare it at startup
+ // so the first poster does not trigger dependency optimization mid-session.
+ optimizeDeps: {
+ include: ["fabric"],
+ },
// Packaged Electron apps load index.html via file://, so root-absolute
// asset URLs resolve to the filesystem root and leave a blank window.
base: isDesktopBuild ? "./" : "/",