Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Rolldown with Vite v6 #43

Closed
wants to merge 174 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
43a0867
feat: use rolldown in the dep optimizer
sapphi-red Sep 11, 2024
a3fe122
feat: use rolldown for build
sapphi-red Sep 12, 2024
7f4463b
chore: skip plugin-legacy build
sapphi-red Sep 12, 2024
f71fd52
chore: skip typecheck for now
sapphi-red Sep 12, 2024
eaefc7f
chore: 🤖 add justfile for faster dev
IWANABETHATGUY Aug 15, 2024
ab4a853
feat: add experimental.enableNativePlugin (#41)
IWANABETHATGUY Sep 10, 2024
f332074
feat: clone class plugins correctly
IWANABETHATGUY Sep 13, 2024
2b00a1e
feat: native build plugins (#45) (#46)
IWANABETHATGUY Sep 12, 2024
632754e
perf: reduce pre alias plugin in build mode
IWANABETHATGUY Sep 12, 2024
e46cd0e
feat: 🎸 add an new option to disable build report
IWANABETHATGUY Sep 13, 2024
23cdb63
feat: support native define
sapphi-red Sep 18, 2024
c702f87
feat: use filter for plugins (#49) (#50) (#51) (#52) (#53)
sapphi-red Sep 18, 2024
965adf0
perf: ⚡️ use default resolver (#56)
IWANABETHATGUY Sep 14, 2024
a12ad02
chore: bump rolldown
sapphi-red Sep 24, 2024
f9df06f
chore: skip data uri by load fallback plugin for native data uri hand…
sapphi-red Sep 24, 2024
4e8b874
feat: handle non-relative paths by Vite's resolver for enableNativePl…
sapphi-red Sep 19, 2024
917ee43
chore: remove browser field edge case test
sapphi-red Sep 25, 2024
f59ea65
chore: use advancedChunks instead of manualChunks
sapphi-red Oct 1, 2024
fafbd68
feat: convert `optimizeDeps.esbuildOptions` to `optimizeDeps.rollupOp…
sapphi-red Oct 4, 2024
3d12009
fix: optimizeDeps test pass on windows
sapphi-red Oct 9, 2024
32fe623
chore: make some tests passing
sapphi-red Oct 9, 2024
6b7c1a6
chore: make glob-import test pass with workarounds
sapphi-red Oct 9, 2024
2d624e1
chore: run worker-es tests
sapphi-red Oct 9, 2024
158c2e7
fix: use preliminaryFileName for chunkMetadata key
sapphi-red Oct 10, 2024
b2cac64
feat: oxc tranformer (#60)
underfin Oct 11, 2024
bb0814d
feat: use `onlyRemoveTypeImports`
sapphi-red Oct 11, 2024
f0a94ae
chore: enable continuous release under rolldown-vite (#61)
yyx990803 Oct 12, 2024
d1a9320
feat: environment aware native plugins
sapphi-red Oct 15, 2024
78ecbb5
feat: export transformWithOxc (#62)
underfin Oct 17, 2024
a6ad54c
feat: add oxc jsxInclude and jsxExclude (#63)
underfin Oct 18, 2024
189f697
chore: update some tests that relies on rollup's behavior
sapphi-red Oct 24, 2024
9e84e43
chore: skip environment-react-ssr for now
sapphi-red Oct 24, 2024
cb0c0cb
chore: bump rolldown
sapphi-red Oct 24, 2024
1bfef08
chore: skip minifySyntax test as it relies on specific esbuild option
sapphi-red Oct 24, 2024
1d82e0f
chore: fix type errors
sapphi-red Oct 24, 2024
bc8b43e
chore: skip sideeffects set for HTML scripts for now
sapphi-red Nov 6, 2024
1934b36
chore: tweak tests
sapphi-red Nov 6, 2024
cbfbc57
chore: bump rolldown
sapphi-red Nov 6, 2024
ae1cfbf
chore: enable backend-integration test
sapphi-red Nov 6, 2024
8d98006
chore: skip error message test
sapphi-red Nov 13, 2024
b3fa0f7
feat: enable lib mode tests (#64)
sapphi-red Nov 13, 2024
918e169
chore: fix LICENSE
sapphi-red Nov 14, 2024
9255bc3
chore: uncomment things implemented on rolldown now
sapphi-red Nov 18, 2024
a102494
chore: enable html sideeffects test
sapphi-red Nov 18, 2024
42e45aa
chore: reduce diff
sapphi-red Nov 18, 2024
0a5c1b0
feat: use native Vite resolver (#65)
sapphi-red Nov 19, 2024
56f0967
chore: add workaround and make environment-react-ssr playground pass
sapphi-red Nov 21, 2024
7961722
chore: add comment
sapphi-red Nov 21, 2024
b9f60b1
chore: fix oxc option convertion and reduce warnings
sapphi-red Nov 22, 2024
4db4558
chore: bump rolldown
sapphi-red Nov 25, 2024
6c56281
chore: update snapshot
sapphi-red Nov 25, 2024
37349c1
chore: fix for new vite resolve plugin
sapphi-red Nov 25, 2024
4760d40
feat: use native plugin for create id resolver (#68)
sapphi-red Nov 25, 2024
977cf74
chore: bump rolldown
sapphi-red Nov 28, 2024
85a186e
chore: fix for the latest rolldown
sapphi-red Nov 28, 2024
2812b04
chore: enable modulepreload unit test
sapphi-red Nov 28, 2024
9fd5466
chore: bump rolldown
sapphi-red Nov 29, 2024
41bb735
chore: set platform option and remove workaround in environment-react…
sapphi-red Nov 29, 2024
c00fb58
chore: update some tests that relies on rollup's behavior
sapphi-red Nov 29, 2024
815768d
feat: use rolldown for config loader (#69)
sapphi-red Nov 29, 2024
43b13b2
feat: use rolldown effectively for the optimizer (#70)
sapphi-red Nov 29, 2024
b358841
feat: use oxc for non-native define plugin (#71)
sapphi-red Dec 3, 2024
484165c
feat: use lightningcss by default for cssMinify (#72)
sapphi-red Dec 3, 2024
69d9570
chore: reduce oxc not supported warnings
sapphi-red Dec 3, 2024
0a72e81
feat: use rolldown minify (#73)
sapphi-red Dec 4, 2024
5317937
fix: isolate `chunk.viteMetadata` values for each build (#74)
hi-ogawa Dec 6, 2024
1709ad6
perf: do less on js side for optimizer (#76)
sapphi-red Dec 10, 2024
c227a08
chore: bump rolldown
sapphi-red Dec 11, 2024
a1d5eb1
chore: handle oxc errors
sapphi-red Dec 11, 2024
bbfce13
chore: change for latest native vite resolver plugin
sapphi-red Dec 6, 2024
644bb43
chore: getCombinedSourcemap is now supported
sapphi-red Dec 6, 2024
1d06580
chore: set keepNames
sapphi-red Dec 6, 2024
d19a2a6
chore: update sourcemap snapshot
sapphi-red Dec 11, 2024
6db246f
chore: enable some define tests
sapphi-red Dec 11, 2024
9ab5f71
chore: change for latest native json plugin
sapphi-red Dec 11, 2024
fbb8d01
chore: update modulePreloadPolyfill snapshot
sapphi-red Dec 11, 2024
ec8584e
chore: reduce diff for Sourcemap::toUrl/Sourcemap::toString
sapphi-red Dec 11, 2024
ffd82ea
chore: make external test pass by manually polyfilling require
sapphi-red Dec 11, 2024
edfa823
chore: remove workaround
sapphi-red Dec 11, 2024
1f43732
feat: use oxc for lowering (#77)
sapphi-red Dec 12, 2024
2b68b11
feat: make esbuild optional peer dep (#78)
sapphi-red Dec 12, 2024
f9f36e5
fix(css): inline css insert for single quote `use strict` (#79)
underfin Dec 16, 2024
dc6bfb0
chore: bump rolldown
sapphi-red Dec 16, 2024
e7b5d24
chore: bump rolldown
sapphi-red Dec 19, 2024
73bc847
chore: update for oxc.jsx type change
sapphi-red Dec 19, 2024
022ac73
chore: update for PluginContext type change
sapphi-red Dec 19, 2024
42ea1e1
fix: return transformed content as `moduleType: 'js'`
sapphi-red Dec 20, 2024
71ec6df
feat: use setPublicClassFields for useDefineForClassFields support
sapphi-red Dec 20, 2024
e6038cd
fix: set `onlyRemoveTypeImports: false` by default
sapphi-red Dec 20, 2024
4f8b929
chore: bump rolldown
sapphi-red Dec 20, 2024
3e013cd
chore: tweak types
sapphi-red Dec 20, 2024
3524bbc
chore: update some snapshots
sapphi-red Dec 26, 2024
dd6f052
chore: bump rolldown
sapphi-red Dec 26, 2024
be24eaf
chore: update snapshot
sapphi-red Dec 26, 2024
82ee42b
chore: fix type
sapphi-red Dec 26, 2024
6e1465a
chore: disable rolldown define process.env.NODE_ENV
sapphi-red Dec 26, 2024
b00d5cb
chore: suppress rolldown minifier warning
sapphi-red Dec 26, 2024
15001c5
chore: use types from rolldown
sapphi-red Dec 26, 2024
13158bd
chore: remove lightningcss from optional peer dep
sapphi-red Dec 28, 2024
8903577
fix: oxc esbuild transform option compat
sapphi-red Jan 10, 2025
65074d5
fix: use esbuildOptions.platform as rollupOptions.platform for compat
sapphi-red Jan 10, 2025
d3c1976
fix: generate sourcemap in oxc plugin
sapphi-red Jan 10, 2025
40b3781
chore: bump rolldown
sapphi-red Jan 16, 2025
c430826
chore: fix types
sapphi-red Jan 16, 2025
cf4a21b
chore: skip a test due to bug in rolldown
sapphi-red Jan 16, 2025
ccc5f16
chore: tweak snapshots
sapphi-red Jan 16, 2025
4afc688
refactor: use parseAst from rolldown (#81)
sapphi-red Jan 17, 2025
3acceff
refactor: remove rollup from dependency
sapphi-red Jan 17, 2025
182a8e8
fix: don't modify oxc options in each transform
sapphi-red Jan 17, 2025
fb22380
feat: allow using parseAst from rollup with VITE_USE_LEGACY_PARSE_AST
sapphi-red Jan 17, 2025
834c17d
fix: oxc esbuild jsx option compat
sapphi-red Jan 17, 2025
469054c
feat: allow `cssPlugin.transform` to be called
sapphi-red Jan 17, 2025
358d894
chore: export OxcOptions
sapphi-red Jan 17, 2025
03f9d7e
chore: export esbuildVersion for backward compat
sapphi-red Jan 22, 2025
02a2582
fix: match optimizer entry by file name than facadeModuleId
sapphi-red Jan 22, 2025
fb49dea
chore: bump rolldown
sapphi-red Jan 23, 2025
08045e2
Revert "chore: skip a test due to bug in rolldown"
sapphi-red Jan 23, 2025
34a7923
chore: use `moduleResolution: bundler` for now
sapphi-red Jan 23, 2025
f2df1bf
fix: double `export default` for txt files
sapphi-red Jan 23, 2025
d99af27
feat: convert esbuild plugin to rolldown plugin
sapphi-red Jan 23, 2025
3f89361
fix: incorrect optimizer file hash
sapphi-red Jan 24, 2025
71793fd
fix: buffer full reload messages
sapphi-red Jan 24, 2025
5628c24
chore: bump rolldown
sapphi-red Jan 24, 2025
7e151f3
fix: oxc transpile use normal options over tsconfig options
sapphi-red Jan 24, 2025
1da3630
fix: slient output for runtime helper bundle
sapphi-red Jan 24, 2025
e0eaac2
chore: bump rolldown
sapphi-red Jan 28, 2025
e2e5e23
chore: add @babel/runtime for now
sapphi-red Jan 31, 2025
7f35025
chore: dedupe OXC warnings
sapphi-red Jan 31, 2025
a75ef2e
chore: suppress optimizeDeps.esbuildOptions warning
sapphi-red Jan 31, 2025
2b6f3ea
chore: bump rolldown
sapphi-red Feb 5, 2025
85088bb
chore: update snapshots
sapphi-red Feb 5, 2025
916a70b
fix: set `oxc.jsx.development` when `esbuild.jsxDev` is set
sapphi-red Feb 5, 2025
ed21725
chore: update snapshots
sapphi-red Feb 6, 2025
134ea2a
chore: fixes for newer rolldown
sapphi-red Feb 6, 2025
04de66f
chore: bump rolldown
sapphi-red Feb 7, 2025
4c7856d
chore: use types from rolldown
sapphi-red Feb 7, 2025
3004b5c
chore: bump rolldown
sapphi-red Feb 12, 2025
abd2558
chore: revert some compat code introduced by https://github.com/rolld…
sapphi-red Feb 12, 2025
0b68831
fix: support backquotes
sapphi-red Feb 12, 2025
d3b76d1
chore: skip some sourcemap tests
sapphi-red Feb 12, 2025
ae60c56
feat: run DCE even if minify is false
sapphi-red Feb 12, 2025
a5347fd
chore: use types from rolldown
sapphi-red Feb 12, 2025
b957a46
feat: enable decorator test
sapphi-red Feb 12, 2025
536d540
chore: update decorators workaround
sapphi-red Feb 12, 2025
fb0e51b
fix: use parseAst for rolldown for workerImportMetaUrl as well
sapphi-red Feb 12, 2025
4aa3cf1
fix: optimizer chunk filename
sapphi-red Feb 12, 2025
94eaa87
chore: bump rolldown
sapphi-red Feb 13, 2025
83f46e2
chore: use `convertSpanUtf16` and remove compat layer
sapphi-red Feb 13, 2025
8c63e53
chore: bump rolldown
sapphi-red Feb 17, 2025
913fdf5
chore: migrate to @oxc-project/runtime
sapphi-red Feb 17, 2025
a2d46a7
chore: fix parseAst rolldown compat
sapphi-red Feb 17, 2025
b7f34b3
chore: reenable tests
sapphi-red Feb 17, 2025
29a7cc7
chore: update scanner tsconfig comment
sapphi-red Feb 17, 2025
18dafee
fix: `useDefineForClassFields: true` with ES2022<
sapphi-red Feb 17, 2025
7a7f61c
fix: pass rollupOptions.resolve for optimizer
sapphi-red Feb 17, 2025
b49c080
chore: don't show optimizeDeps.esbuildOptions deprecation warning if …
sapphi-red Feb 18, 2025
a309184
refactor: remove module meta workaround
sapphi-red Feb 18, 2025
6a036e4
chore: bump rolldown
sapphi-red Feb 18, 2025
5e65161
fix: allow chunk.modules mutation on js side (#82)
hi-ogawa Feb 19, 2025
1413162
chore: fix jsdoc for experimental.enableNativePlugin
sapphi-red Feb 20, 2025
d8253b6
chore: bump rolldown
sapphi-red Feb 21, 2025
aa8e869
chore: update snapshot
sapphi-red Feb 21, 2025
ad7fdfb
chore: use parseAst from rolldown directly
sapphi-red Feb 21, 2025
dfef416
feat: filter loadFallback plugin
sapphi-red Feb 27, 2025
2efb84c
chore: bump rolldown
sapphi-red Mar 3, 2025
97ec95b
chore: skip some tests for now
sapphi-red Mar 3, 2025
4c45ea5
chore: update snapshot
sapphi-red Mar 3, 2025
82737df
fix: run esbuild if `build.minify: 'esbuild'` is set
sapphi-red Mar 3, 2025
13cc840
chore: reduce diff
sapphi-red Mar 4, 2025
0742036
fix: config sourcemap support
sapphi-red Mar 5, 2025
ef48b84
fix: align optimizer resolve logic with esbuild
sapphi-red Mar 5, 2025
8898545
fix: make `vite:worker-post` plugin more robust
sapphi-red Mar 5, 2025
ad6c9c6
revert: "chore: use moduleResolution: bundler for now"
sapphi-red Mar 6, 2025
1b9494c
chore: remove workaround for https://github.com/oxc-project/oxc/issue…
sapphi-red Mar 6, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ jobs:
- name: Check formatting
run: pnpm prettier --write --log-level=warn . && git diff --exit-code

- name: Typecheck
run: pnpm run typecheck
# - name: Typecheck
# run: pnpm run typecheck

- name: Test docs
run: pnpm run test-docs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ permissions:
on:
push:
branches:
- main
- rolldown-v6
pull_request:
types: [opened, synchronize, labeled]

jobs:
preview:
if: >
github.repository == 'vitejs/vite' &&
github.repository == 'rolldown/vite' &&
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview')))
runs-on: ubuntu-latest
Expand All @@ -35,4 +35,4 @@ jobs:
working-directory: ./packages/vite
run: pnpm build

- run: pnpm dlx [email protected] publish --compact --pnpm ./packages/vite
- run: pnpm dlx [email protected] publish --pnpm ./packages/vite
2 changes: 1 addition & 1 deletion docs/_data/blog.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Post {
}

declare const data: Post[]
export { data }
export { type data }

export default createContentLoader('blog/*.md', {
// excerpt: true,
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default tseslint.config(
{
allowModules: [
'vite',
'esbuild',
'less',
'sass',
'sass-embedded',
Expand Down
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build-vite:
pnpm --filter vite run build-bundle

test-serve:
pnpm run test-serve

test-build:
pnpm run test-build

test: test-serve test-build

fmt:
pnpm --filter vite run format
1 change: 0 additions & 1 deletion packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild && pnpm run patch-cjs",
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
"prepublishOnly": "npm run build"
},
Expand Down
77 changes: 33 additions & 44 deletions packages/vite/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,11 @@ Repository: lukeed/polka

---------------------------------------

## @rollup/plugin-alias, @rollup/plugin-commonjs, @rollup/plugin-dynamic-import-vars, @rollup/pluginutils
## @rollup/plugin-alias, @rollup/plugin-dynamic-import-vars, @rollup/pluginutils
License: MIT
By: Johannes Stein
Repository: rollup/plugins

License: MIT
By: Rich Harris
Repository: rollup/plugins

License: MIT
By: LarsDenBakker
Repository: rollup/plugins
Expand Down Expand Up @@ -584,38 +580,6 @@ Repository: git+https://github.com/paulmillr/chokidar.git

---------------------------------------

## commondir, shell-quote
License: MIT
By: James Halliday
Repositories: http://github.com/substack/node-commondir.git, http://github.com/ljharb/shell-quote.git

> The MIT License
>
> Copyright (c) 2013 James Halliday ([email protected])
>
> Permission is hereby granted, free of charge,
> to any person obtaining a copy of this software and
> associated documentation files (the "Software"), to
> deal in the Software without restriction, including
> without limitation the rights to use, copy, modify,
> merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom
> the Software is furnished to do so,
> subject to the following conditions:
>
> The above copyright notice and this permission notice
> shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## connect
License: MIT
By: TJ Holowaychuk, Douglas Christopher Wilson, Jonathan Ong, Tim Caswell
Expand Down Expand Up @@ -1298,13 +1262,6 @@ Repository: micromatch/is-glob

---------------------------------------

## is-reference
License: MIT
By: Rich Harris
Repository: git+https://github.com/Rich-Harris/is-reference.git

---------------------------------------

## isexe, which
License: ISC
By: Isaac Z. Schlueter
Expand Down Expand Up @@ -2147,6 +2104,38 @@ Repository: kevva/shebang-command

---------------------------------------

## shell-quote
License: MIT
By: James Halliday
Repository: http://github.com/ljharb/shell-quote.git

> The MIT License
>
> Copyright (c) 2013 James Halliday ([email protected])
>
> Permission is hereby granted, free of charge,
> to any person obtaining a copy of this software and
> associated documentation files (the "Software"), to
> deal in the Software without restriction, including
> without limitation the rights to use, copy, modify,
> merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom
> the Software is furnished to do so,
> subject to the following conditions:
>
> The above copyright notice and this permission notice
> shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## sirv
License: MIT
By: Luke Edwards
Expand Down
1 change: 1 addition & 0 deletions packages/vite/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const asyncFunctions = [
'createServer',
'preview',
'transformWithEsbuild',
'transformWithOxc',
'resolveConfig',
'optimizeDeps',
'formatPostcssSourceMap',
Expand Down
19 changes: 11 additions & 8 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"license": "MIT",
"author": "Evan You",
"description": "Native-ESM powered web dev build tool",
"description": "Vite on Rolldown preview",
"bin": {
"vite": "bin/vite.js"
},
Expand Down Expand Up @@ -85,9 +85,10 @@
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.25.0",
"@oxc-project/runtime": "^0.53.0",
"lightningcss": "^1.29.1",
"postcss": "^8.5.3",
"rollup": "^4.30.1"
"rolldown": "1.0.0-beta.3-commit.62fba31"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
Expand All @@ -96,6 +97,7 @@
"@ampproject/remapping": "^2.3.0",
"@babel/parser": "^7.26.9",
"@jridgewell/trace-mapping": "^0.3.25",
"@oxc-project/types": "^0.53.0",
"@polka/compression": "^1.0.0-next.25",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.2",
Expand All @@ -117,12 +119,12 @@
"dotenv": "^16.4.7",
"dotenv-expand": "^12.0.1",
"es-module-lexer": "^1.6.0",
"esbuild": "^0.24.2",
"escape-html": "^1.0.3",
"estree-walker": "^3.0.3",
"etag": "^1.8.1",
"http-proxy": "^1.18.1",
"launch-editor-middleware": "^2.10.0",
"lightningcss": "^1.29.1",
"magic-string": "^0.30.17",
"mlly": "^1.7.4",
"mrmime": "^2.0.1",
Expand All @@ -137,6 +139,7 @@
"postcss-load-config": "^6.0.1",
"postcss-modules": "^6.0.1",
"resolve.exports": "^2.0.3",
"rollup": "^4.23.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.2.1",
"rollup-plugin-license": "^3.6.0",
Expand All @@ -155,9 +158,9 @@
},
"peerDependencies": {
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
"esbuild": "^0.25.0",
"jiti": ">=1.21.0",
"less": "*",
"lightningcss": "^1.21.0",
"sass": "*",
"sass-embedded": "*",
"stylus": "*",
Expand All @@ -170,6 +173,9 @@
"@types/node": {
"optional": true
},
"esbuild": {
"optional": true
},
"jiti": {
"optional": true
},
Expand All @@ -188,9 +194,6 @@
"sugarss": {
"optional": true
},
"lightningcss": {
"optional": true
},
"terser": {
"optional": true
},
Expand Down
4 changes: 3 additions & 1 deletion packages/vite/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const nodeConfig = defineConfig({
/^vite\//,
'fsevents',
'rollup/parseAst',
'rolldown/parseAst',
'rolldown/experimental',
/^tsx\//,
/^#/,
...Object.keys(pkg.dependencies),
Expand Down Expand Up @@ -190,7 +192,7 @@ const moduleRunnerConfig = defineConfig({
external: [
'fsevents',
'lightningcss',
'rollup/parseAst',
'rolldown/parseAst',
...Object.keys(pkg.dependencies),
],
plugins: [
Expand Down
22 changes: 11 additions & 11 deletions packages/vite/rollup.dts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const pkg = JSON.parse(
const external = [
/^node:*/,
/^vite\//,
'rollup/parseAst',
'rolldown/parseAst',
'rolldown/experimental',
...Object.keys(pkg.dependencies),
...Object.keys(pkg.peerDependencies),
...Object.keys(pkg.devDependencies),
Expand Down Expand Up @@ -46,17 +47,16 @@ const identifierWithTrailingDollarRE = /\b(\w+)\$\d+\b/g
* the module that imports the identifer as a named import alias
*/
const identifierReplacements: Record<string, Record<string, string>> = {
rollup: {
Plugin$1: 'rollup.Plugin',
PluginContext$1: 'rollup.PluginContext',
MinimalPluginContext$1: 'rollup.MinimalPluginContext',
TransformPluginContext$1: 'rollup.TransformPluginContext',
TransformResult$1: 'rollup.TransformResult',
rolldown: {
Plugin$1: 'rolldown.Plugin',
PluginContext$1: 'rolldown.PluginContext',
MinimalPluginContext$1: 'rolldown.MinimalPluginContext',
TransformPluginContext$1: 'rolldown.TransformPluginContext',
TransformResult$1: 'rolldown.TransformResult',
},
esbuild: {
TransformResult$2: 'esbuild_TransformResult',
TransformOptions$1: 'esbuild_TransformOptions',
BuildOptions$1: 'esbuild_BuildOptions',
'rolldown/experimental': {
TransformOptions$1: 'rolldown_experimental_TransformOptions',
TransformResult$2: 'rolldown_experimental_TransformResult',
},
'node:https': {
Server$1: 'HttpsServer',
Expand Down
13 changes: 7 additions & 6 deletions packages/vite/src/node/__tests__/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
RollupLog,
RollupOptions,
RollupOutput,
} from 'rollup'
} from 'rolldown'
import type { LibraryFormats, LibraryOptions } from '../build'
import {
build,
Expand Down Expand Up @@ -131,13 +131,13 @@ describe('build', () => {
{
"changed": [
"index",
"_foo",
"_bar",
"_foo",
"_baz.css",
],
"unchanged": [
"_foo.css",
"_bar.css",
"_foo.css",
"undefined",
],
}
Expand Down Expand Up @@ -861,11 +861,11 @@ test.for([true, false])(
([client, ssr, custom1, custom2] as RollupOutput[]).map(
(o) => o.output[0].code.split('\n').length,
),
).toEqual([2, 5, 2, 5])
).toEqual([1, 5, 1, 5])
},
)

test('adjust worker build error for worker.format', async () => {
test.skip('adjust worker build error for worker.format', async () => {
try {
await build({
root: resolve(__dirname, 'fixtures/worker-dynamic'),
Expand All @@ -886,7 +886,8 @@ test('adjust worker build error for worker.format', async () => {
expect.unreachable()
})

describe('onRollupLog', () => {
// rolldown does not append plugin name to the message automatically
describe.skip('onRollupLog', () => {
const pluginName = 'rollup-plugin-test'
const msgInfo = 'This is the INFO message.'
const msgWarn = 'This is the WARN message.'
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/__tests__/environment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path'
import { describe, expect, onTestFinished, test } from 'vitest'
import type { RollupOutput } from 'rollup'
import type { RolldownOutput } from 'rolldown'
import { createServer } from '../server'
import type { InlineConfig } from '../config'
import { createBuilder } from '../build'
Expand Down Expand Up @@ -167,7 +167,7 @@ describe('custom environment conditions', () => {
const results: Record<string, unknown> = {}
for (const key of ['ssr', 'worker', 'custom1', 'custom1_2']) {
const output = await builder.build(builder.environments[key])
const chunk = (output as RollupOutput).output[0]
const chunk = (output as RolldownOutput).output[0]
const mod = await import(
path.join(
import.meta.dirname,
Expand Down
Loading
Loading