Skip to content

feat: Vite 8 support and Rolldown/Oxc migration#138

Open
semoal wants to merge 1 commit intoaxe-me:mainfrom
semoal:backport/vite8-rolldown-oxc
Open

feat: Vite 8 support and Rolldown/Oxc migration#138
semoal wants to merge 1 commit intoaxe-me:mainfrom
semoal:backport/vite8-rolldown-oxc

Conversation

@semoal
Copy link

@semoal semoal commented Mar 16, 2026

Summary

This backports Vite 8 support to vite-plugin-node and aligns plugin internals/docs with the Vite 8 toolchain (Rolldown + Oxc), while keeping SWC as an opt-in path.

Why this backport

Vite 8 switched core internals from Rollup/esbuild to Rolldown/Oxc. The plugin still carried Vite 7-era config and terminology (rollupOptions, esbuild defaults), which creates drift and deprecation risk for users upgrading to Vite 8.

What changed

1) Vite 8 compatibility and version alignment

  • Bumped workspace catalog to Vite 8 (pnpm-workspace.yaml).
  • Bumped package version to 8.0.0 (packages/vite-plugin-node/package.json).

2) Config migration for Vite 8

  • Migrated internal build config from build.rollupOptions to build.rolldownOptions.
  • In SWC mode, switched from disabling esbuild to disabling oxc:
    • plugincConfig.esbuild = false -> plugincConfig.oxc = false.

3) Compiler mode/API cleanup

  • SupportedTSCompiler changed from 'esbuild' | 'swc' to 'vite' | 'swc'.
  • Default compiler mode changed to 'vite' (Vite default transformer pipeline).
  • Updated README examples and wording accordingly.

4) Output format constraints for Rolldown

  • Removed unsupported format values from exported types:
    • removed: amd, system, systemjs
    • retained: cjs, es, iife, umd, commonjs, esm, module

5) SWC transform plugin cleanup

  • Replaced @rollup/pluginutils usage with createFilter exported by vite.
  • Removed now-unused @rollup/pluginutils dependency.

6) TypeScript build config update

  • Updated package tsconfig to NodeNext so Vite 8 ESM types resolve correctly:
    • moduleResolution: "NodeNext"
    • module: "NodeNext"

7) Documentation/changelog

  • Added 8.x.x -> 8.x.x mapping row in both README files.
  • Updated compiler/default comments and architecture wording.
  • Added 8.0.0 changelog entry with breaking changes and migration notes.

Breaking changes

  • tsCompiler no longer accepts 'esbuild'; use 'vite' or 'swc'.
  • outputFormat no longer accepts amd, system, systemjs.

Validation

Ran in this branch:

  • pnpm --filter vite-plugin-node lint
  • pnpm --filter vite-plugin-node build-dist
  • pnpm link and tested the HMR and build command in our monorepo with a large API powered by Fastify ✅

Branch / commit

  • Branch: backport/vite8-rolldown-oxc
  • Commit: cdbc163

@semoal semoal changed the title feat: backport Vite 8 support and Rolldown/Oxc migration feat: Vite 8 support and Rolldown/Oxc migration Mar 16, 2026
@semoal semoal mentioned this pull request Mar 16, 2026
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