Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
428 commits
Select commit Hold shift + click to select a range
3a86721
fix: set `viteMetadata` for return value of `build` function (#262)
sapphi-red Jun 16, 2025
1ae083f
release: v6.3.21
sapphi-red Jun 16, 2025
732f25a
chore: merge commit '86b5e0030bf204f8f2db0cf8ee895ab3ecf154b8' into r…
sapphi-red Jun 16, 2025
3fa7588
chore: merge commit 'a37ac836ac4da8e854d98c65450f12acb921aa98' into r…
sapphi-red Jun 16, 2025
e9f2d8d
Merge commit '61b6b96b191c6071b9c574ad4c795f97f2646f18' into rolldown…
sapphi-red Jun 16, 2025
5f406c7
chore: merge commit 'a33d0c7d65d9fff9acd5de0cf3c4d371297b3990' into r…
sapphi-red Jun 16, 2025
18e54bf
chore: merge commit '24692dbeccd148a60f563bc96e12e3609e5ba642' into r…
sapphi-red Jun 16, 2025
b77bcfe
fix: merge conflict mistake
sapphi-red Jun 17, 2025
bf77840
fix: merge conflict mistake
sapphi-red Jun 17, 2025
76e5a34
chore: merge commit '9c6cbe602187644887b0a4342de6b486c8f60f4d' into r…
sapphi-red Jun 17, 2025
a443b0a
chore: merge main
sapphi-red Jun 17, 2025
2588f03
fix(native-plugin): run optimizer correctly (#265)
sapphi-red Jun 17, 2025
6f8287b
feat: update rolldown
sapphi-red Jun 18, 2025
b53667a
fix: importing an optional peer dep should throw an runtime error (#167)
sapphi-red Jun 18, 2025
e418d5e
perf: set filter for import analysis build plugin (#266)
sapphi-red Jun 18, 2025
973087f
fix: set viteMetadata for `writeBundle` hook (#263)
sapphi-red Jun 18, 2025
24721d2
release: v7.0.0-alpha.0
sapphi-red Jun 18, 2025
d6369f3
fix: resolve oxc runtime from Vite directory correctly (#269)
sapphi-red Jun 18, 2025
8638a59
fix(css): set moduleType in css-post plugin (#272)
sapphi-red Jun 18, 2025
b292707
feat: update rolldown
sapphi-red Jun 19, 2025
bdd4d29
fix(json): require(json) should return the content (#268)
sapphi-red Jun 19, 2025
eb58e92
release: v7.0.0-beta.0
sapphi-red Jun 19, 2025
ed35e62
chore: merge main
sapphi-red Jun 20, 2025
de9074c
feat(native-plugin): fallback to js alias plugin when alias entries i…
shulaoda Jun 23, 2025
c4e6ecc
chore: merge main
sapphi-red Jun 24, 2025
c4ed008
release: v7.0.0
sapphi-red Jun 24, 2025
541ea6e
chore: merge main
sapphi-red Jun 25, 2025
bd99df1
chore: fix docs build
sapphi-red Jun 25, 2025
0b5708b
feat: update rolldown (#279)
shulaoda Jun 25, 2025
4df58bd
release: v7.0.1
sapphi-red Jun 25, 2025
0100764
feat: update rolldown
sapphi-red Jun 26, 2025
ce38669
release: v7.0.2
sapphi-red Jun 26, 2025
d499b50
feat: update rolldown
sapphi-red Jun 27, 2025
191dd85
chore: merge main
sapphi-red Jun 27, 2025
5f3ce8b
feat: add `resolve.tsconfigPaths` option to resolve with tsconfig pat…
sapphi-red Jun 27, 2025
9b5e32a
release: v7.0.3
sapphi-red Jun 27, 2025
6058493
feat(native-plugin): avoid presetting `process.env.NODE_ENV` when pla…
shulaoda Jun 30, 2025
5c0dddb
feat: update rolldown and support `resolveSubpathImports` for `oxcRes…
shulaoda Jul 2, 2025
c45adb3
feat(native-plugin): use js define plugin in dev environment (#298)
shulaoda Jul 2, 2025
2d7ce9a
feat(native-plugin): pass `decodedBase` to `nativeWasmHelperPlugin` (…
shulaoda Jul 2, 2025
549e1e0
chore: merge main
sapphi-red Jul 2, 2025
fa87556
release: v7.0.4
sapphi-red Jul 2, 2025
139d016
fix: correct "Unexpected IIFE format" shown for UMD output
sapphi-red Jul 2, 2025
12f8197
fix: accept umd with only default export (#305)
sapphi-red Jul 2, 2025
a677564
test: enable oxc runtime injection in lib playground
sapphi-red Jul 2, 2025
5c9187a
chore: merge main
sapphi-red Jul 3, 2025
0ab1f85
chore: preview release plugin-legacy
sapphi-red Jul 3, 2025
0d36bef
chore: preview release plugin-legacy
sapphi-red Jul 3, 2025
d9627ee
feat: make oxc runtime helpers name mangle-able (#306)
sapphi-red Jul 3, 2025
e1ef2e5
feat: plugin legacy (#293)
sapphi-red Jul 3, 2025
1667c24
chore: remove `ROLLDOWN_OPTIONS_VALIDATION=loose` from vitepress config
sapphi-red Jul 4, 2025
86be7a2
chore: merge main
sapphi-red Jul 4, 2025
a657265
chore: reduce diff
sapphi-red Jul 4, 2025
3f07670
feat: update rolldown and support custom configs for native dynamic i…
shulaoda Jul 6, 2025
6c5f468
fix: inject oxc runtime helpers correctly when multiple helpers are r…
sapphi-red Jul 7, 2025
1268eac
release: v7.0.5
sapphi-red Jul 7, 2025
5d7dc73
fix(legacy): fix remaining issues (#312)
sapphi-red Jul 7, 2025
d1efdd0
feat: enable `treeshake.commonjs` by default (#313)
sapphi-red Jul 7, 2025
36a8ca4
feat: enable decorator-metadata transform automatically (#315)
sapphi-red Jul 7, 2025
56a900e
chore: merge main
sapphi-red Jul 8, 2025
15690fc
release: v7.0.6
sapphi-red Jul 8, 2025
de24b6b
fix: disable refresh for non-jsx without react import (#318)
hi-ogawa Jul 9, 2025
6f79210
perf(legacy): set some babel options
sapphi-red Jul 10, 2025
d8901ca
chore: merge main
sapphi-red Jul 10, 2025
d352c1b
refactor: use Rolldown's `@oxc-project/runtime` (#321)
sapphi-red Jul 10, 2025
949076c
feat: update rolldown
sapphi-red Jul 10, 2025
287a36e
feat: enable `output.minifyInternalExports` by default (#322)
sapphi-red Jul 10, 2025
3042f71
release: v7.0.7
sapphi-red Jul 10, 2025
c9e4477
chore: merge main
sapphi-red Jul 11, 2025
98ca5e3
feat: update rolldown
sapphi-red Jul 11, 2025
a2835f6
release: v7.0.8
sapphi-red Jul 11, 2025
ce60f95
chore: update some "rollup" -> "rolldown"
sapphi-red Jul 11, 2025
722cbf8
feat: update rolldown
sapphi-red Jul 14, 2025
5c52bbc
release: v7.0.9
sapphi-red Jul 14, 2025
24c0417
feat: warn when `esbuild: false` is set but `oxc: false` is not set
sapphi-red Jul 18, 2025
67af25b
chore: merge main
sapphi-red Jul 18, 2025
c47c03a
chore: merge main
sapphi-red Jul 22, 2025
2bbf424
feat: update rolldown
sapphi-red Jul 22, 2025
b19b90a
release: v7.0.10
sapphi-red Jul 22, 2025
8cab72c
fix(worker): match worker import meta more quickly (#336)
sapphi-red Jul 22, 2025
f16e598
feat(native-plugin): inject css and assets for native manifest plugin…
shulaoda Jul 22, 2025
c252dee
fix(lib): keep annotation comments for es output (#337)
sapphi-red Jul 22, 2025
cb9e8e8
chore: merge main
sapphi-red Jul 25, 2025
40b5198
release: v7.0.11
sapphi-red Jul 25, 2025
e2bb54e
fix: reset viteMetadata in watch mode (#342)
sapphi-red Jul 25, 2025
a44f3de
test: enable optimize-deps cjs test case
sapphi-red Jul 29, 2025
2c4159e
chore: update rolldown-plugin-dts
sapphi-red Jul 29, 2025
56f94c7
feat: bump rolldown (#344)
sapphi-red Jul 30, 2025
2ea6194
feat(native-plugin): output warn / debug logs from resolver (#343)
sapphi-red Jul 30, 2025
6f99a1c
release: v7.0.12
sapphi-red Jul 30, 2025
f607e0b
chore: merge main
sapphi-red Jul 30, 2025
f2f4529
chore: fix type error
sapphi-red Jul 30, 2025
a7b6ce0
fix: apply https://github.com/vitejs/vite/pull/20503
sapphi-red Jul 31, 2025
16fa088
feat: bump rolldown
sapphi-red Aug 4, 2025
70a9530
release: v7.1.0-beta.0
sapphi-red Aug 4, 2025
793cf71
feat: enable native resolver by default (#346)
sapphi-red Aug 4, 2025
80dc4d6
refactor: introduce `*.rolldownOptions` and deprecate `*.rollupOption…
sapphi-red Aug 5, 2025
6958a48
fix: watch the config file itself (#354)
sapphi-red Aug 5, 2025
c2befdc
release: v7.1.0-beta.1
sapphi-red Aug 5, 2025
ca8dc80
chore: merge main
sapphi-red Aug 5, 2025
eb776bd
release: v7.1.0-beta.2
sapphi-red Aug 5, 2025
2008da5
chore: update JSDoc of `experimental.enableNativePlugin` option
sapphi-red Aug 6, 2025
4dab15e
refactor: deprecate esbuild / optimizeDeps.esbuild options (#355)
sapphi-red Aug 6, 2025
0e4553b
chore: merge main
sapphi-red Aug 7, 2025
368b93c
chore: merge main
sapphi-red Aug 7, 2025
a2594ec
fix(legacy): use remove conditions for normal Vite
sapphi-red Aug 7, 2025
b37507a
release: v7.1.0
sapphi-red Aug 7, 2025
2603932
fix: respect `rollupOptions.platform` options (#361)
hi-ogawa Aug 8, 2025
f51756e
feat: update rolldown (#366)
shulaoda Aug 12, 2025
6837235
chore: merge main
sapphi-red Aug 12, 2025
aa8f700
chore: fix typecheck
sapphi-red Aug 12, 2025
38f0c09
release: v7.1.1
sapphi-red Aug 12, 2025
7ad2330
feat: enable all native plugins by default (#168)
sapphi-red Aug 12, 2025
f88cb05
release: v7.1.2
sapphi-red Aug 12, 2025
07da856
feat: warn if a plugin specified both `rollupOptions` and `rolldownOp…
sapphi-red Aug 18, 2025
4056cc6
feat: update rolldown (#379)
sapphi-red Aug 18, 2025
e6eb30a
fix: merge tsconfig jsx options even when `oxc.jsx.runtime` is set (…
hi-ogawa Aug 18, 2025
85d2c8d
release: v7.1.3
sapphi-red Aug 18, 2025
99a4fe1
chore: merge main
sapphi-red Aug 19, 2025
5e9596a
chore: fix js plugin test
sapphi-red Aug 19, 2025
a0904a7
chore: merge main
sapphi-red Aug 19, 2025
8ee8847
release: v7.1.4
sapphi-red Aug 19, 2025
9d6e3e9
chore: merge main
sapphi-red Aug 21, 2025
e76ad17
fix(native-plugin): generate a more readable manifest (#388)
shulaoda Aug 25, 2025
6db67e5
feat: update rolldown (#389)
sapphi-red Aug 25, 2025
d9a2a73
release: v7.1.5
sapphi-red Aug 25, 2025
7ea4f54
feat: enable `output.topLevelVar` by default (#380)
sapphi-red Aug 25, 2025
dd64f89
fix(oxc): respect `oxc.typescript.onlyRemoveTypeImports` if it's set …
shulaoda Aug 29, 2025
6ea9918
feat: update rolldown
sapphi-red Sep 8, 2025
1a05fc4
fix: `build.minify: 'esbuild'` + native plugins were not working (#397)
sapphi-red Sep 8, 2025
dbf2f31
release: v7.1.6
sapphi-red Sep 8, 2025
0f90088
chore: merge main
sapphi-red Sep 8, 2025
74de9b6
release: v7.1.7
sapphi-red Sep 8, 2025
80120d6
chore: support ESM rolldown
sapphi-red Sep 8, 2025
b2b89d7
feat: enable `optimization.inlineConst: { mode: 'smart' }` by default…
sapphi-red Sep 8, 2025
4698941
chore: update typos
sapphi-red Sep 8, 2025
5f3af0d
chore: merge main
sapphi-red Sep 8, 2025
762cb49
chore: update type build
sapphi-red Sep 8, 2025
88a0359
feat: update rolldown (#400)
sapphi-red Sep 8, 2025
6c702cc
release: v7.1.8
sapphi-red Sep 8, 2025
ad72fc3
fix: enable minify other than codegen for ES lib mode
sapphi-red Sep 8, 2025
2fbd7f1
chore: bump `rolldown-plugin-dts` (#409)
IWANABETHATGUY Sep 10, 2025
d14afd7
feat: update rolldown
sapphi-red Sep 11, 2025
fee7e95
release: v7.1.9
sapphi-red Sep 11, 2025
854436b
feat: update rolldown (#415)
sapphi-red Sep 16, 2025
db8a886
release: v7.1.10
sapphi-red Sep 16, 2025
efed40f
fix(optimizer): avoid mutating `optimizeDeps.rollupOptions.transforms…
hi-ogawa Sep 17, 2025
f641aaa
chore: merge main
sapphi-red Sep 18, 2025
438fee4
chore: fix typecheck
sapphi-red Sep 18, 2025
a017086
release: v7.1.11
sapphi-red Sep 18, 2025
beb2e36
chore: merge main
sapphi-red Sep 22, 2025
6713908
feat: update rolldown (#423)
sapphi-red Sep 22, 2025
fd23359
release: v7.1.12
sapphi-red Sep 22, 2025
ebd134f
feat(hmr): skip self-imports for `import.meta.hot.invalidate`
sapphi-red Sep 24, 2025
007e115
feat: update rolldown
sapphi-red Sep 24, 2025
569d1aa
release: v7.1.13
sapphi-red Sep 24, 2025
ef03153
chore: merge main
sapphi-red Sep 24, 2025
7c7ffdc
fix: use readFileSync to avoid "too many open files"
sapphi-red Sep 29, 2025
ac1ceaf
perf: use single regex for `isEntirelyImport`
sapphi-red Sep 29, 2025
bac2c1b
feat: update rolldown
sapphi-red Sep 30, 2025
4cfe8e1
feat: set `generatedCode: 'es2015'`
sapphi-red Sep 30, 2025
3211d22
release: v7.1.14
sapphi-red Sep 30, 2025
9a4ab2d
chore: merge main
sapphi-red Oct 2, 2025
9afe6f6
fix(oxc): set typescript jsx options
sapphi-red Oct 2, 2025
f0a0666
release: v7.1.15
sapphi-red Oct 2, 2025
b2b39fb
chore: merge main
sapphi-red Oct 3, 2025
80ec52c
fix: set transform target (#441)
sapphi-red Oct 3, 2025
4eb7418
feat: update rolldown (#443)
sapphi-red Oct 7, 2025
e0c91ae
release: v7.1.16
sapphi-red Oct 7, 2025
9cf9481
chore: merge main
sapphi-red Oct 14, 2025
2ac79ea
chore: fix type error
sapphi-red Oct 14, 2025
08ea49e
feat: update rolldown
sapphi-red Oct 14, 2025
122eb25
release: v7.1.17
sapphi-red Oct 14, 2025
5305fc7
refactor: revert #313
sapphi-red Oct 17, 2025
0ae0c16
chore: merge main
sapphi-red Oct 20, 2025
7f011b3
release: v7.1.18
sapphi-red Oct 20, 2025
c136ed6
chore: merge main
sapphi-red Oct 20, 2025
db4d46d
chore: fix types
sapphi-red Oct 20, 2025
f9d348e
feat: update rolldown (#456)
sapphi-red Oct 20, 2025
46e89c0
fix: resolve default export consistently (#444)
sapphi-red Oct 20, 2025
b8970d0
refactor: revert #322
sapphi-red Oct 20, 2025
61f4caa
refactor: avoid deprecated rolldown options (e.g. top level `define`)
sapphi-red Oct 20, 2025
ae0a2d2
chore: merge main
sapphi-red Oct 20, 2025
8455590
chore: fix type
sapphi-red Oct 20, 2025
5ea606c
release: v7.1.19
sapphi-red Oct 20, 2025
76e28a7
feat(legacy): add`build.rolldownOptions.output.sourcemapBaseUrl` support
sapphi-red Oct 27, 2025
946b447
test: enable temporary disabled tests
sapphi-red Oct 27, 2025
4406b5c
fix(optimizer): pass target to optimizer
sapphi-red Oct 27, 2025
e373d76
feat: update rolldown (#467)
sapphi-red Oct 27, 2025
10aa992
feat: add legacy inconsistent cjs interop (#464)
sapphi-red Oct 27, 2025
d5bd5bf
fix(deps): downgrade commonjs plugin to 28.0.6 to avoid rollup/plugin…
sapphi-red Oct 27, 2025
4168e80
release: v7.1.20
sapphi-red Oct 27, 2025
2b87665
fix(resolve): don't modify resolve options (#468)
sapphi-red Oct 27, 2025
a626a62
chore: merge main
sapphi-red Oct 28, 2025
37a5392
chore: fix typecheck
sapphi-red Oct 28, 2025
d79ee4e
chore: fix merge error
sapphi-red Oct 28, 2025
8cf0e15
release: v7.2.0-beta.0
sapphi-red Oct 28, 2025
4139f2b
fix: trigger watchChange hook for all environments for native resolve…
sapphi-red Oct 28, 2025
744ba3e
fix: set inferred moduleType for virtual modules (#470)
sapphi-red Oct 28, 2025
cc36605
fix(optimizer): support `namespace: 'file'` filter in esbuild plugin …
sapphi-red Nov 4, 2025
af067c0
chore: merge main
sapphi-red Nov 4, 2025
f1a0dce
release: v7.2.0-beta.1
sapphi-red Nov 4, 2025
f4cfdf4
feat: update rolldown (#481)
sapphi-red Nov 4, 2025
1c7d85a
release: v7.2.0-beta.2
sapphi-red Nov 4, 2025
23711ec
fix(optimizer): sync `optimizeDeps.rollupOptions` and `optimizeDeps.r…
sapphi-red Nov 4, 2025
b2554c1
feat: update rolldown (#488)
sapphi-red Nov 5, 2025
7568ceb
feat: expose `minify` function (#489)
sapphi-red Nov 5, 2025
158a968
release: v7.2.0-beta.3
sapphi-red Nov 5, 2025
cac9204
chore: merge main
sapphi-red Nov 5, 2025
a0fe412
release: v7.2.0
sapphi-red Nov 5, 2025
5e7c000
chore: merge main
sapphi-red Nov 6, 2025
31593fe
release: v7.2.1
sapphi-red Nov 6, 2025
feac3af
feat: convert `esbuild.jsxSideEffects` to `oxc.jsx.pure` (#493)
sapphi-red Nov 6, 2025
e8feb9f
fix(optimizer): convert to `optimizeDeps.rolldownOptions.transform.de…
sapphi-red Nov 6, 2025
3b8bc55
fix: set `legalComments: 'none'` to align with Vite (#497)
sapphi-red Nov 7, 2025
f26b034
chore: merge main
sapphi-red Nov 7, 2025
f4908e4
release: v7.2.2
sapphi-red Nov 7, 2025
242b321
feat: update rolldown (#502)
sapphi-red Nov 11, 2025
c0420d3
release: v7.2.3
sapphi-red Nov 11, 2025
ec441fc
feat!: change `minify` to be async (#505)
sapphi-red Nov 11, 2025
1ffb4ea
feat: expose `parse` / `parseAsync` (#503)
sapphi-red Nov 11, 2025
8e32f61
fix: don't set `ssr.optimizeDeps.rollupOptions` compat if `ssr` optio…
sapphi-red Nov 11, 2025
46a6777
refactor: runtime deprecate `optimizeDeps.rollupOptions` (#507)
sapphi-red Nov 11, 2025
ecf9fd2
release: v7.2.4
sapphi-red Nov 11, 2025
c23e699
feat: update rolldown to 1.0.0-beta.50 (#508)
sapphi-red Nov 12, 2025
edab97e
release: v7.2.5
sapphi-red Nov 12, 2025
2cf8062
docs: migration guide (#469)
sapphi-red Nov 14, 2025
22bd8e5
feat: update rolldown to 1.0.0-beta.51 (#512)
shulaoda Nov 19, 2025
14ec6a0
release: v7.2.6
sapphi-red Nov 19, 2025
54cfc00
fix: esbuild plugin converter with empty JS files. (#516)
cpojer Nov 20, 2025
20f3f6c
chore: merge main
sapphi-red Nov 20, 2025
abc49a3
release: v7.2.7
sapphi-red Nov 20, 2025
38a8609
fix: `inconsistentCjsInterop: true` should affect dynamic imports as …
sapphi-red Nov 26, 2025
c49af21
chore: merge main
sapphi-red Nov 26, 2025
a64ade3
feat: update rolldown to 1.0.0-beta.52 (#522)
shulaoda Nov 26, 2025
69c482b
release: v7.2.8
sapphi-red Nov 26, 2025
55af8d9
chore: merge main
sapphi-red Dec 1, 2025
ef44d75
release: v7.2.9
sapphi-red Dec 1, 2025
f570695
test: add nested tsconfig paths test (#527)
sapphi-red Dec 1, 2025
9cb6db9
feat: deprecate `build.commonjsOptions` (#530)
sapphi-red Dec 2, 2025
0e6179b
docs: update content for beta (#529)
sapphi-red Dec 2, 2025
ddd6427
docs: remove rolldown page (#528)
sapphi-red Dec 2, 2025
f8319f6
chore: merge main
sapphi-red Dec 2, 2025
308fcf6
test: remove failure expected cases (#536)
sapphi-red Dec 2, 2025
0b242f7
docs: update migration guide. (#538)
cpojer Dec 3, 2025
d488ed4
feat: update rolldown to 1.0.0-beta.53 (#537)
shulaoda Dec 3, 2025
b72ff6d
test: add test for https://github.com/vitejs/rolldown-vite/issues/523…
sapphi-red Dec 3, 2025
7d8436c
fix: disable resolver cache when watcher is disabled (#471)
sapphi-red Dec 3, 2025
3bf7217
release: v7.2.10
sapphi-red Dec 3, 2025
35b3cae
chore: changes to merge back to vite repo
sapphi-red Dec 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body:
id: system-info
attributes:
label: System Info
description: Output of `npx envinfo --system --npmPackages '{vite,@vitejs/*,rollup}' --binaries --browsers`
description: Output of `npx envinfo --system --npmPackages '{vite,@vitejs/*,rollup,rolldown}' --binaries --browsers`
render: shell
placeholder: System, Binaries, Browsers
validations:
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Rolldown-Vite & Vite 8 beta Issues
url: https://github.com/vitejs/rolldown-vite/issues/new/choose
about: Rolldown-Vite related issues should be reported on the rolldown-vite repository.
- name: Vite Plugin React Issues
url: https://github.com/vitejs/vite-plugin-react/issues/new/choose
about: React related issues should be reported on the vite-plugin-react repository.
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,78 @@ jobs:
steps:
- run: echo "Build & Test Failed"

test-js-plugins:
needs: changed
if: needs.changed.outputs.should_skip != 'true'
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node_version: [22]
fail-fast: false

name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }} (js plugins)"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"

- name: Install deps
run: pnpm install

# Install playwright's binary under custom directory to cache
- name: (non-windows) Set Playwright path and Get playwright version
if: runner.os != 'Windows'
run: |
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- name: (windows) Set Playwright path and Get playwright version
if: runner.os == 'Windows'
run: |
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
$env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')"
echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV

- name: Cache Playwright's binary
uses: actions/cache@v4
with:
key: ${{ runner.os }}-playwright-bin-v1-${{ env.PLAYWRIGHT_VERSION }}
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
restore-keys: |
${{ runner.os }}-playwright-bin-v1-

- name: Install Playwright
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
run: pnpm playwright install chromium

- name: Build
run: pnpm run build

- name: Test unit
run: pnpm run test-unit
env:
_VITE_TEST_JS_PLUGIN: 1

- name: Test serve
run: pnpm run test-serve
env:
_VITE_TEST_JS_PLUGIN: 1

- name: Test build
run: pnpm run test-build
env:
_VITE_TEST_JS_PLUGIN: 1

lint:
timeout-minutes: 10
runs-on: ubuntu-latest
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ jobs:
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

- name: Build
- name: Build Vite core
working-directory: ./packages/vite
run: pnpm build

- run: pnpm dlx pkg-pr-new@0.0 publish --compact --pnpm ./packages/vite
- name: Build plugin-legacy
working-directory: ./packages/plugin-legacy
run: pnpm build

- run: pnpm dlx pkg-pr-new@0.0 publish --pnpm './packages/vite' './packages/plugin-legacy'
4 changes: 0 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,6 @@ export default defineConfig({
text: 'Performance',
link: '/guide/performance',
},
{
text: 'Rolldown',
link: '/guide/rolldown',
},
{
text: `Migration from v${viteMajorVersion - 1}`,
link: '/guide/migration',
Expand Down
46 changes: 31 additions & 15 deletions docs/config/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Browser compatibility target for the final bundle. The default value is a Vite s

Another special value is `'esnext'` - which assumes native dynamic imports support and will only perform minimal transpiling.

The transform is performed with esbuild and the value should be a valid [esbuild target option](https://esbuild.github.io/api/#target). Custom targets can either be an ES version (e.g. `es2015`), a browser with version (e.g. `chrome58`), or an array of multiple target strings.
The transform is performed with Oxc Transformer and the value should be a valid [Oxc Transformer target option](https://oxc.rs/docs/guide/usage/transformer/lowering#target). Custom targets can either be an ES version (e.g. `es2015`), a browser with version (e.g. `chrome58`), or an array of multiple target strings.

Note the build will fail if the code contains features that cannot be safely transpiled by esbuild. See [esbuild docs](https://esbuild.github.io/content-types/#javascript) for more details.
Note the build will output a warning if the code contains features that cannot be safely transpiled by Oxc. See [Oxc docs](https://oxc.rs/docs/guide/usage/transformer/lowering#warnings) for more details.

## build.modulePreload

Expand Down Expand Up @@ -129,10 +129,16 @@ In this case, you need to set `build.cssTarget` to `chrome61` to prevent vite fr

## build.cssMinify

- **Type:** `boolean | 'esbuild' | 'lightningcss'`
- **Default:** the same as [`build.minify`](#build-minify) for client, `'esbuild'` for SSR
- **Type:** `boolean | 'lightningcss' | 'esbuild'`
- **Default:** the same as [`build.minify`](#build-minify) for client, `'lightningcss'` for SSR

This option allows users to override CSS minification specifically instead of defaulting to `build.minify`, so you can configure minification for JS and CSS separately. Vite uses `esbuild` by default to minify CSS. Set the option to `'lightningcss'` to use [Lightning CSS](https://lightningcss.dev/minification.html) instead. If selected, it can be configured using [`css.lightningcss`](./shared-options.md#css-lightningcss).
This option allows users to override CSS minification specifically instead of defaulting to `build.minify`, so you can configure minification for JS and CSS separately. Vite uses [Lightning CSS](https://lightningcss.dev/minification.html) by default to minify CSS. It can be configured using [`css.lightningcss`](./shared-options.md#css-lightningcss). Set the option to `'esbuild'` to use esbuild instead.

esbuild must be installed when it is set to `'esbuild'`.

```sh
npm add -D esbuild
```

## build.sourcemap

Expand All @@ -141,17 +147,20 @@ This option allows users to override CSS minification specifically instead of de

Generate production source maps. If `true`, a separate sourcemap file will be created. If `'inline'`, the sourcemap will be appended to the resulting output file as a data URI. `'hidden'` works like `true` except that the corresponding sourcemap comments in the bundled files are suppressed.

## build.rollupOptions
## build.rolldownOptions

- **Type:** [`RollupOptions`](https://rollupjs.org/configuration-options/)
- **Type:** [`RolldownOptions`](https://rollupjs.org/configuration-options/)

Directly customize the underlying Rollup bundle. This is the same as options that can be exported from a Rollup config file and will be merged with Vite's internal Rollup options. See [Rollup options docs](https://rollupjs.org/configuration-options/) for more details.
<!-- TODO: update the link above and below to Rolldown's documentation -->

## build.commonjsOptions
Directly customize the underlying Rolldown bundle. This is the same as options that can be exported from a Rolldown config file and will be merged with Vite's internal Rolldown options. See [Rolldown options docs](https://rollupjs.org/configuration-options/) for more details.

- **Type:** [`RollupCommonJSOptions`](https://github.com/rollup/plugins/tree/master/packages/commonjs#options)
## build.rollupOptions

- **Type:** `RolldownOptions`
- **Deprecated**

Options to pass on to [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs).
This option is an alias of `build.rolldownOptions` option. Use `build.rolldownOptions` option instead.

## build.dynamicImportVarsOptions

Expand All @@ -160,6 +169,8 @@ Options to pass on to [@rollup/plugin-commonjs](https://github.com/rollup/plugin

Options to pass on to [@rollup/plugin-dynamic-import-vars](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars).

<!-- TODO: we need to have a more detailed explanation here as we no longer use @rollup/plugin-dynamic-import-vars. we should say it's compatible with it though -->

## build.lib

- **Type:** `{ entry: string | string[] | { [entryAlias: string]: string }, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string | ((format: ModuleFormat, entryName: string) => string), cssFileName?: string }`
Expand Down Expand Up @@ -256,16 +267,19 @@ During the SSR build, static assets aren't emitted as it is assumed they would b

## build.minify

- **Type:** `boolean | 'terser' | 'esbuild'`
- **Default:** `'esbuild'` for client build, `false` for SSR build
- **Type:** `boolean | 'oxc' | 'terser' | 'esbuild'`
- **Default:** `'oxc'` for client build, `false` for SSR build

Set to `false` to disable minification, or specify the minifier to use. The default is [esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
Set to `false` to disable minification, or specify the minifier to use. The default is [Oxc Minifier](https://oxc.rs/docs/guide/usage/minifier) which is 30 ~ 90x faster than terser and only 0.5 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)

`build.minify: 'esbuild'` is deprecated and will be removed in the future.

Note the `build.minify` option does not minify whitespaces when using the `'es'` format in lib mode, as it removes pure annotations and breaks tree-shaking.

Terser must be installed when it is set to `'terser'`.
esbuild or Terser must be installed when it is set to `'esbuild'` or `'terser'` respectively.

```sh
npm add -D esbuild
npm add -D terser
```

Expand Down Expand Up @@ -314,6 +328,8 @@ Limit for chunk size warnings (in kB). It is compared against the uncompressed c

## build.watch

<!-- TODO: update the link below to Rolldown's documentation -->

- **Type:** [`WatcherOptions`](https://rollupjs.org/configuration-options/#watch)`| null`
- **Default:** `null`

Expand Down
25 changes: 19 additions & 6 deletions docs/config/dep-optimization-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ export default defineConfig({
})
```

## optimizeDeps.rolldownOptions <NonInheritBadge />

- **Type:** [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)`<``RolldownOptions`, `'input' | 'logLevel' | 'output'> & {
output?: [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)`<`
`RolldownOutputOptions`,
`'format' | 'sourcemap' | 'dir' | 'banner'>`
`}`

<!-- TODO: add link to RolldownOptions -->
<!-- TODO: add link to RolldownOutputOptions -->

Options to pass to Rolldown during the dep scanning and optimization.

Certain options are omitted since changing them would not be compatible with Vite's dep optimization.

- `plugins` are merged with Vite's dep plugin

## optimizeDeps.esbuildOptions <NonInheritBadge />

- **Type:** [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)`<`[`EsbuildBuildOptions`](https://esbuild.github.io/api/#general-options)`,
Expand All @@ -64,13 +81,9 @@ export default defineConfig({
| 'outbase'
| 'outExtension'
| 'metafile'>`
- **Deprecated**

Options to pass to esbuild during the dep scanning and optimization.

Certain options are omitted since changing them would not be compatible with Vite's dep optimization.

- `external` is also omitted, use Vite's `optimizeDeps.exclude` option
- `plugins` are merged with Vite's dep plugin
This option is converted to `optimizeDeps.rolldownOptions` internally. Use `optimizeDeps.rolldownOptions` instead.

## optimizeDeps.force <NonInheritBadge />

Expand Down
2 changes: 1 addition & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vite --config my-config.js
```

::: tip CONFIG LOADING
By default, Vite uses `esbuild` to bundle the config into a temporary file and load it. This may cause issues when importing TypeScript files in a monorepo. If you encounter any issues with this approach, you can specify `--configLoader runner` to use the [module runner](/guide/api-environment-runtimes.html#modulerunner) instead, which will not create a temporary config and will transform any files on the fly. Note that module runner doesn't support CJS in config files, but external CJS packages should work as usual.
By default, Vite uses [Rolldown](https://rolldown.rs/) to bundle the config into a temporary file and load it. This may cause issues when importing TypeScript files in a monorepo. If you encounter any issues with this approach, you can specify `--configLoader runner` to use the [module runner](/guide/api-environment-runtimes.html#modulerunner) instead, which will not create a temporary config and will transform any files on the fly. Note that module runner doesn't support CJS in config files, but external CJS packages should work as usual.

Alternatively, if you're using an environment that supports TypeScript (e.g. `node --experimental-strip-types`), or if you're only writing plain JavaScript, you can specify `--configLoader native` to use the environment's native runtime to load the config file. Note that updates to modules imported by the config file are not detected and hence would not auto-restart the Vite server.
:::
Expand Down
34 changes: 22 additions & 12 deletions docs/config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ See [Env Variables and Modes](/guide/env-and-mode) for more details.

Define global constant replacements. Entries will be defined as globals during dev and statically replaced during build.

Vite uses [esbuild defines](https://esbuild.github.io/api/#define) to perform replacements, so value expressions must be a string that contains a JSON-serializable value (null, boolean, number, string, array, or object) or a single identifier. For non-string values, Vite will automatically convert it to a string with `JSON.stringify`.
Vite uses [Oxc's define feature](https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define) to perform replacements, so value expressions must be a string that contains a JSON-serializable value (null, boolean, number, string, array, or object) or a single identifier. For non-string values, Vite will automatically convert it to a string with `JSON.stringify`.

**Example:**

Expand Down Expand Up @@ -96,6 +96,8 @@ Directory to save cache files. Files in this directory are pre-bundled deps or s

Will be passed to `@rollup/plugin-alias` as its [entries option](https://github.com/rollup/plugins/tree/master/packages/alias#entries). Can either be an object, or an array of `{ find, replacement, customResolver }` pairs.

<!-- TODO: we need to have a more detailed explanation here as we no longer use @rollup/plugin-alias. we should say it's compatible with it though -->

When aliasing to file system paths, always use absolute paths. Relative alias values will be used as-is and will not be resolved into file system paths.

More advanced custom resolution can be achieved through [plugins](/guide/api-plugin).
Expand Down Expand Up @@ -353,36 +355,44 @@ If set to `true`, imported JSON will be transformed into `export default JSON.pa

If set to `'auto'`, the data will be stringified only if [the data is bigger than 10kB](https://v8.dev/blog/cost-of-javascript-2019#json:~:text=A%20good%20rule%20of%20thumb%20is%20to%20apply%20this%20technique%20for%20objects%20of%2010%20kB%20or%20larger).

## esbuild
## oxc

- **Type:** `ESBuildOptions | false`
- **Type:** `OxcOptions | false`

`ESBuildOptions` extends [esbuild's own transform options](https://esbuild.github.io/api/#transform). The most common use case is customizing JSX:
`OxcOptions` extends [Oxc Transformer's options](https://oxc.rs/docs/guide/usage/transformer). The most common use case is customizing JSX:

```js
export default defineConfig({
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
oxc: {
jsx: {
runtime: 'classic',
pragma: 'h',
pragmaFrag: 'Fragment',
},
},
})
```

By default, esbuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.
By default, transformation by Oxc is applied to `ts`, `jsx` and `tsx` files. You can customize this with `oxc.include` and `oxc.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.

In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by esbuild:
In addition, you can also use `oxc.jsxInject` to automatically inject JSX helper imports for every file transformed by Oxc:

```js
export default defineConfig({
esbuild: {
oxc: {
jsxInject: `import React from 'react'`,
},
})
```

When [`build.minify`](./build-options.md#build-minify) is `true`, all minify optimizations are applied by default. To disable [certain aspects](https://esbuild.github.io/api/#minify) of it, set any of `esbuild.minifyIdentifiers`, `esbuild.minifySyntax`, or `esbuild.minifyWhitespace` options to `false`. Note the `esbuild.minify` option can't be used to override `build.minify`.
Set to `false` to disable transformation by Oxc.

## esbuild

- **Type:** `ESBuildOptions | false`
- **Deprecated**

Set to `false` to disable esbuild transforms.
This option is converted to `oxc` option internally. Use `oxc` option instead.

## assetsInclude

Expand Down
11 changes: 10 additions & 1 deletion docs/config/worker-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ The function should return new plugin instances as they are used in parallel rol

## worker.rollupOptions

- **Type:** [`RollupOptions`](https://rollupjs.org/configuration-options/)
<!-- TODO: update the link below to Rolldown's documentation -->

- **Type:** [`RolldownOptions`](https://rollupjs.org/configuration-options/)

Rollup options to build worker bundle.

## worker.rollupOptions

- **Type:** `RolldownOptions`
- **Deprecated**

This option is an alias of `worker.rolldownOptions` option. Use `build.rolldownOptions` option instead.
17 changes: 17 additions & 0 deletions docs/guide/api-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,21 @@ function normalizePath(id: string): string

Normalizes a path to interoperate between Vite plugins.

## `transformWithOxc`

**Type Signature:**

```ts
async function transformWithOxc(
code: string,
filename: string,
options?: OxcTransformOptions,
inMap?: object,
): Promise<Omit<OxcTransformResult, 'errors'> & { warnings: string[] }>
```

Transform JavaScript or TypeScript with [Oxc Transformer](https://oxc.rs/docs/guide/usage/transformer). Useful for plugins that prefer matching Vite's internal Oxc Transformer transform.

## `transformWithEsbuild`

**Type Signature:**
Expand All @@ -402,6 +417,8 @@ async function transformWithEsbuild(
): Promise<ESBuildTransformResult>
```

**Deprecated:** Use `transformWithOxc` instead.

Transform JavaScript or TypeScript with esbuild. Useful for plugins that prefer matching Vite's internal esbuild transform.

## `loadConfigFromFile`
Expand Down
Loading