Skip to content

feat: Migration to Vite+#2745

Open
matthewlipski wants to merge 9 commits into
pnpm-11from
vite-plus
Open

feat: Migration to Vite+#2745
matthewlipski wants to merge 9 commits into
pnpm-11from
vite-plus

Conversation

@matthewlipski
Copy link
Copy Markdown
Collaborator

Summary

First of all, apologies for the massive file diff. It was unfortunately unavoidable as every package.json file in the repo has had its vite dep swapped with vite-plus, and every unit test file's vitest import path has also been changed to vite-plus/test.

With that out of the way, here's a breakdown of what the migration involves:

Dev server & building

Basically nothing has changed here. We were already using Vite for this and we are still using Vite, so our existing scripts and configs work out of the box.

Linting & formatting

We were using ESLint and Prettier for this, which have been swapped out for oxlint and oxfmt as part of Vite+. The new formatting is almost the same as before, though you will still see some formatting changes in the diff. These fall into 3 categories:

  1. Files that were not formatted previously but should have been, htmlToMarkdown.ts for example. This file was not formatted properly, evident by things like {return ...;}.
  2. Formatting changes in docs files. These were due to NextJS having its own opinionated formatting that took priority over the root Prettier config. Now, everything uses the same format provided by Vite+.
  3. TailwindCSS class ordering in docs React components. Vite+ comes with Tailwind class ordering built-in, which uses a slightly different order to the Prettier plugin we were using. Can probably be configured, haven't looked into it because the component files are reformatted anyway per the previous category.

One major caveat here is that some important ESLint rules we were using do not have equivalents in oxlint, namely these:

  • import/no-cycle
  • import/no-extraneous-dependencies
  • import/extensions

Testing

Our unit tests are pretty much unchanged as we were already using Vitest (short of import paths). The only issue I'm running into is with the Vitest VSCode extension which seems to not be running the setup code, as snapshots have randomized block IDs. Running the test script seems to work fine though.

For e2e tests, I haven't converted our Playwright tests to Vitest Browser Mode yet. This PR is already kind of huge and I don't want to inflate the diff even more, so that will come in a separate PR, as there will be quite a bit to go over there.

Monorepo scripts & releases

The majority of monorepo functionality, i.e. using a single script to run multiple scripts across packages, is now handled by Vite Task as opposed to NX. This should also include caching of script results, though this seems to not be working atm.

NX has not been removed entirely as Vite+ doesn't include tools for releasing to npm, so nx release is still used for this.

Rationale

Vite+ should simplify and speed up our tooling a lot. It employs pretty much the same stack we are already using for the block-view project, and it's worked well for us there.

Simplification

Vite+ bundles together DX, bundling, testing, and more that is currently split between:

  • Vite
  • ESLint
  • Prettier
  • Vitest
  • Playwright
  • NX

Speedup

Vite+ uses oxlint and oxfmt for linting & formatting which are rust based and substantially faster than ESLint and Prettier.

Additionally, Vitest Browser Mode should also speed up our e2e tests quite a bit vs Playwright (will be done in a separate PR though).

Changes

See above for general changes.

There are also a few specific changes that are worth explaining:

  • .nvmrc has been renamed to .node-version. It still does the same thing, but is recognized by a variety of applications and not just NVM.
  • .vite-hooks/pre-commit is auto added by the Vite+ migration utility.
  • nx.json has been heavily cut down as it is not only responsible for releases - other functionality is handled by Vite Task.
  • vite-plus is given the version range "catalog:", which ensures the same version is used across packages.
  • packages/dev-scripts/gen.ts has had its JSON serialization updated to match oxfmt formatting.

Impact

See summary.

Testing

See summary.

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

Things to consider/fix:

  • Script result caching not working.
  • ESLint rules not having an oxlint equivalent.
  • VSCode Vitest extension not running setup script.
  • NX is still needed for release script.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
blocknote Error Error May 15, 2026 3:46pm
blocknote-website Error Error May 15, 2026 3:46pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c4c8e08-2f8d-4107-98d7-da46d3cb29f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vite-plus

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

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

@matthewlipski matthewlipski changed the base branch from main to pnpm-11 May 13, 2026 19:03
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 14, 2026

Open in StackBlitz

@blocknote/ariakit

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

@blocknote/code-block

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

@blocknote/core

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

@blocknote/mantine

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

@blocknote/react

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

@blocknote/server-util

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

@blocknote/shadcn

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

@blocknote/xl-ai

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

@blocknote/xl-docx-exporter

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

@blocknote/xl-email-exporter

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

@blocknote/xl-multi-column

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

@blocknote/xl-odt-exporter

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

@blocknote/xl-pdf-exporter

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

commit: e9f6de2

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