Skip to content

perf!: publish ESM-only packages without sourcemaps and test artifacts - #3118

Open
nperez0111 wants to merge 3 commits into
mainfrom
split/esm-package-size
Open

nperez0111 wants to merge 3 commits into
mainfrom
split/esm-package-size

Conversation

@nperez0111

@nperez0111 nperez0111 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

First of four PRs replacing #2903. Based directly on origin/main (3a37d23).

Removes CommonJS outputs and exports, stops publishing sourcemaps and test/build artifacts, and narrows the package files lists while retaining necessary assets and CSS. This is the packaging change only; emoji and AI changes follow in separate PRs.

Breaking change: consumers must use ESM imports rather than CommonJS require(). Sourcemaps are no longer published.

Verified: @blocknote/core and @blocknote/react builds. Package versions remain at 0.55.0 from main. Package-size numbers from the original PR have not been reused because this stack was rebuilt on a newer main.

Original work: #2903.

Summary by CodeRabbit

  • Package Compatibility
    • Published packages now provide ES module entry points only. Existing CommonJS require imports are no longer supported.
  • Package Contents
    • Published packages include source files while excluding tests, fixtures, maps, and other build artifacts. Build outputs no longer include source maps.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Ready Ready Preview Sep 24, 2026 4:16pm UTC
blocknote-website Ready Ready Preview Sep 24, 2026 4:16pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1444e663-c71b-4d06-9e66-e81cade015e5

📥 Commits

Reviewing files that changed from the base of the PR and between aa1933e and 3cd4a74.

📒 Files selected for processing (1)
  • packages/xl-ai-server/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

Build configurations across the listed packages now disable source maps and emit ES modules only. Package metadata updates published-file exclusions and entry points, removing CommonJS require targets. The xl-ai-server package also specifies an explicit sideEffects list.

Changes

ESM-only package distribution

Layer / File(s) Summary
ES-only build outputs
packages/*/vite.config.ts, packages/core/vite.config.bundled.ts, packages/*/tsconfig.json, packages/dev-scripts/tsconfig.json
Vite library builds now emit ES modules with .js filenames and disable source maps. TypeScript source map generation is also disabled. UMD global mappings and CommonJS filename branches are removed.
Package entries and published files
packages/*/package.json
Package entry points and exports now use ESM targets without require conditions. Published-file lists exclude selected CommonJS files, maps, tests, fixtures, and build metadata. The xl-ai-server package lists its side-effectful entries explicitly.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 3cd4a

This change intentionally drops CommonJS support and published source maps. The checked ESM entrypoints work with the repository’s supported Node version, and no concrete packaging regression remains to block merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: ESM-only packages, removal of sourcemaps, and exclusion of test artifacts. It is concise and specific.
Description check ✅ Passed The description accurately covers the packaging changes, rationale, breaking impact, testing performed, and relationship to the earlier work. It does not use the required section headings or include t…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit hopping past the build,
ESM bundles line up in the field.
Maps and test files stay out of the crate,
.js paths mark each package gate.
I thump at the vanished CJS trail,
Then nibble a leaf by the export rail.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3118

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3118

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3118

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3118

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3118

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3118

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3118

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3118

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3118

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3118

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3118

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3118

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3118

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3118

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3118

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3118

commit: 3cd4a74

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-3118/

Built to branch gh-pages at 2026-09-24 16:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@nperez0111
nperez0111 added this pull request to stack #3123 September 24, 2026 14:03

This branch was successfully deployed

2 active deployments
Preview – blocknote-website — 3cd4a741 Deployed Sep 24, 2026 by vercel[bot]
Preview – blocknote — 3cd4a741 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant