You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(superdoc/ui): dedicated UI-only entry + bundle audit (SD-2803)
`superdoc/ui` re-exported from the editor package's root barrel, so
consumers pulled the entire editor app shell into their bundle even
when they only wanted the UI controller — measured at ~7.7 MB across
11 side-effect chunks, dominated by the 4.4 MB main `src-*.es.js`
barrel that carries SuperDoc.vue, the Vue editor app, and friends.
Add a dedicated `./ui` exports entry on `@superdoc/super-editor` that
points at `src/ui/index.ts` directly, plus a Vite alias so the
workspace dev/build resolves it before falling through to the root.
Reroute `packages/superdoc/src/{ui.js,ui.d.ts}` to consume the new
entry.
After: ~3.4 MB across 8 chunks. The 4.4 MB main barrel is gone. The
remaining cost comes from the toolbar handle's `twipsToLines` import
pulling in `super-converter` + `xml-js` + `jszip`; slimming that
chain is a separate refactor.
Add a regression guard to `audit-bundle.cjs` that fails the build if
`ui.es.js` ever side-effect-imports a chunk matching the main barrel
pattern again.
* fix(super-editor): emit dist/ui.es.js as runtime target for ./ui (PR #2999 review)
The new `./ui` exports entry had only `source` + `types`, which is
the established pattern for other workspace-only subpaths
(`./markdown`, `./blank-docx`, `./parts-runtime`,
`./document-api-adapters`). At runtime the published `superdoc/ui`
artifact never resolves through `@superdoc/super-editor/ui` — that
path is a build-time alias hop only — so the source+types-only entry
was sufficient for the actual consumer surface.
Add a real `import` target anyway. Costs nothing, removes ambiguity
for any direct consumer of `@superdoc/super-editor`, and matches the
shape of `./editor`, `./toolbar`, `./headless-toolbar/*`, etc. which
all carry a runtime artifact.
0 commit comments