Skip to content

Commit a443b0a

Browse files
committed
chore: merge main
2 parents 76e5a34 + a6d5997 commit a443b0a

File tree

75 files changed

+1154
-1408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1154
-1408
lines changed

docs/config/build-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ This option allows users to set a different browser target for CSS minification
125125

126126
It should only be used when you are targeting a non-mainstream browser.
127127
One example is Android WeChat WebView, which supports most modern JavaScript features but not the [`#RGBA` hexadecimal color notation in CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb_colors).
128-
In this case, you need to set `build.cssTarget` to `chrome61` to prevent vite from transform `rgba()` colors into `#RGBA` hexadecimal notations.
128+
In this case, you need to set `build.cssTarget` to `chrome61` to prevent vite from transforming `rgba()` colors into `#RGBA` hexadecimal notations.
129129

130130
## build.cssMinify
131131

docs/config/ssr-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For example, when setting `['node', 'custom']`, you should run `NODE_OPTIONS='--
5454

5555
:::
5656

57-
### ssr.resolve.mainFields
57+
## ssr.resolve.mainFields
5858

5959
- **Type:** `string[]`
6060
- **Default:** `['module', 'jsnext:main', 'jsnext']`

docs/guide/rolldown.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ After adding these overrides, reinstall your dependencies and start your develop
8989

9090
While Rolldown aims to be a drop-in replacement for Rollup, there are features that are still being implemented and minor intentional behavior differences. For a comprehensive list, please refer to [this GitHub PR](https://github.com/vitejs/rolldown-vite/pull/84#issue-2903144667) which is regularly updated.
9191

92-
### Option Validation Errors
92+
### Option Validation Warnings
9393

94-
Rolldown throws an error when unknown or invalid options are passed. Because some options available in Rollup are not supported by Rolldown, you may encounter errors based on the options you or the meta framework you use set. Below, you can find an example of such an error message:
94+
Rolldown outputs an warning when unknown or invalid options are passed. Because some options available in Rollup are not supported by Rolldown, you may encounter warnings based on the options you or the meta framework you use set. Below, you can find an example of such an warning message:
9595

96-
> Error: Failed validate input options.
96+
> Warning validate output options.
9797
>
98-
> - For the "preserveEntrySignatures". Invalid key: Expected never but received "preserveEntrySignatures".
98+
> - For the "generatedCode". Invalid key: Expected never but received "generatedCode".
9999
100-
If you don't pass the option in yourself, this must be fixed by the utilized framework. You can suppress this error in the meantime by setting the `ROLLDOWN_OPTIONS_VALIDATION=loose` environment variable.
100+
If you don't pass the option in yourself, this must be fixed by the utilized framework.
101101

102102
### API Differences
103103

@@ -257,6 +257,12 @@ const plugin = {
257257
}
258258
```
259259

260+
::: tip
261+
262+
Since Vite 7.0.0, `this.meta` is available in all hooks. In previous versions, `this.meta` was not available in Vite-specific hooks, such as the `config` hook.
263+
264+
:::
265+
260266
<br>
261267

262268
Checking the existence of the `rolldownVersion` export:
@@ -275,16 +281,15 @@ If you have `vite` as a dependency (not a peer dependency), the `rolldownVersion
275281

276282
### Ignoring option validation in Rolldown
277283

278-
As [mentioned above](#option-validation-errors), Rolldown throws an error when unknown or invalid options are passed.
284+
As [mentioned above](#option-validation-errors), Rolldown outputs a warning when unknown or invalid options are passed.
279285

280286
This can be fixed by conditionally passing the option by checking whether it's running with `rolldown-vite` as [shown above](#detecting-rolldown-vite).
281287

282-
Suppressing the error by setting the `ROLLDOWN_OPTIONS_VALIDATION=loose` environment variable also works in this case.
283-
However, keep in mind that you will **eventually need to stop passing the options not supported by Rolldown**.
284-
285288
### `transformWithEsbuild` requires `esbuild` to be installed separately
286289

287-
A similar function called `transformWithOxc`, which uses Oxc instead of `esbuild`, is exported from `rolldown-vite`.
290+
Since Vite itself does not use `esbuild` any more, `esbuild` is now an optional peer dependency. If your plugin uses `transformWithEsbuild`, the plugin needs to add `esbuild` to its dependencies or the user needs to install it manually.
291+
292+
The recommended migration is to use the newly exported `transformWithOxc` function, which utilizes Oxc instead of `esbuild`.
288293

289294
### Compatibility layer for `esbuild` options
290295

@@ -306,6 +311,12 @@ const plugin = {
306311
Rolldown introduced a [hook filter feature](https://rolldown.rs/guide/plugin-development#plugin-hook-filters) to reduce the communication overhead the between Rust and JavaScript runtimes. By using this feature you can make your plugin more performant.
307312
This is also supported by Rollup 4.38.0+ and Vite 6.3.0+. To make your plugin backward compatible with the older versions, make sure to also run the filter inside the hook handlers.
308313

314+
::: tip
315+
316+
[`@rolldown/pluginutils`](https://www.npmjs.com/package/@rolldown/pluginutils) exports some utilities for hook filters like `exactRegex` and `prefixRegex`.
317+
318+
:::
319+
309320
### Converting content to JavaScript in `load` or `transform` hooks
310321

311322
If you are converting the content to JavaScript from other types in `load` or `transform` hooks, you may need to add `moduleType: 'js'` to the returned value.
@@ -325,4 +336,4 @@ const plugin = {
325336
}
326337
```
327338

328-
This is because [Rolldown supports non-JavaScript modules](https://rolldown.rs/guide/in-depth/module-types) and infers the module type from extensions unless specified. Note that `rolldown-vite` does not support ModuleTypes in dev.
339+
This is because [Rolldown supports non-JavaScript modules](https://rolldown.rs/guide/in-depth/module-types) and infers the module type from extensions unless specified.

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
},
1010
"devDependencies": {
1111
"@shikijs/vitepress-twoslash": "^2.5.0",
12-
"@types/express": "^5.0.2",
12+
"@types/express": "^5.0.3",
1313
"feed": "^5.1.0",
1414
"gsap": "^3.13.0",
1515
"vitepress": "^1.6.3",
1616
"vitepress-plugin-group-icons": "^1.6.0",
17-
"vitepress-plugin-llms": "^1.3.4",
17+
"vitepress-plugin-llms": "^1.5.0",
1818
"vue": "^3.5.16"
1919
}
2020
}

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,39 @@
4040
"ci-docs": "pnpm build && pnpm docs-build"
4141
},
4242
"devDependencies": {
43-
"@eslint/js": "^9.28.0",
43+
"@eslint/js": "^9.29.0",
4444
"@type-challenges/utils": "^0.1.1",
4545
"@types/babel__core": "^7.20.5",
4646
"@types/babel__preset-env": "^7.10.0",
4747
"@types/convert-source-map": "^2.0.3",
4848
"@types/cross-spawn": "^6.0.6",
4949
"@types/debug": "^4.1.12",
5050
"@types/estree": "^1.0.8",
51-
"@types/etag": "^1.8.3",
51+
"@types/etag": "^1.8.4",
5252
"@types/less": "^3.0.8",
53-
"@types/node": "^22.15.30",
53+
"@types/node": "^22.15.31",
5454
"@types/picomatch": "^4.0.0",
5555
"@types/stylus": "^0.48.43",
5656
"@types/ws": "^8.18.1",
5757
"@vitejs/release-scripts": "^1.5.0",
5858
"conventional-changelog-cli": "^5.0.0",
59-
"eslint": "^9.28.0",
60-
"eslint-plugin-import-x": "^4.15.1",
61-
"eslint-plugin-n": "^17.19.0",
62-
"eslint-plugin-regexp": "^2.8.0",
59+
"eslint": "^9.29.0",
60+
"eslint-plugin-import-x": "^4.15.2",
61+
"eslint-plugin-n": "^17.20.0",
62+
"eslint-plugin-regexp": "^2.9.0",
6363
"execa": "^9.6.0",
6464
"globals": "^16.2.0",
65-
"lint-staged": "^16.1.0",
65+
"lint-staged": "^16.1.2",
6666
"picocolors": "^1.1.1",
67-
"playwright-chromium": "^1.50.1",
67+
"playwright-chromium": "^1.53.0",
6868
"prettier": "3.5.3",
6969
"rollup": "^4.40.0",
7070
"simple-git-hooks": "^2.13.0",
71-
"tsx": "^4.19.4",
71+
"tsx": "^4.20.3",
7272
"typescript": "~5.7.2",
73-
"typescript-eslint": "^8.33.1",
73+
"typescript-eslint": "^8.34.0",
7474
"vite": "workspace:*",
75-
"vitest": "^3.2.2"
75+
"vitest": "^3.2.3"
7676
},
7777
"simple-git-hooks": {
7878
"pre-commit": "pnpm exec lint-staged --concurrent false"
@@ -91,7 +91,7 @@
9191
"eslint --cache --fix"
9292
]
9393
},
94-
"packageManager": "pnpm@10.11.1",
94+
"packageManager": "pnpm@10.12.1",
9595
"pnpm": {
9696
"overrides": {
9797
"vite": "workspace:rolldown-vite@*"

packages/create-vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"cross-spawn": "^7.0.6",
3838
"mri": "^1.2.0",
3939
"picocolors": "^1.1.1",
40-
"tsdown": "^0.12.6"
40+
"tsdown": "^0.12.7"
4141
}
4242
}

packages/create-vite/src/index.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const FRAMEWORKS: Framework[] = [
148148
display: 'TanStack Router ↗',
149149
color: cyan,
150150
customCommand:
151-
'npm create -- tsrouter-app@latest TARGET_DIR --framework react --interactive',
151+
'npm create -- tsrouter-app@latest TARGET_DIR --framework React --interactive',
152152
},
153153
{
154154
name: 'redwoodsdk-standard',
@@ -157,6 +157,13 @@ const FRAMEWORKS: Framework[] = [
157157
customCommand:
158158
'npm exec degit redwoodjs/sdk/starters/standard TARGET_DIR',
159159
},
160+
{
161+
name: '@hiogawa/vite-rsc',
162+
display: '@hiogawa/vite-rsc ↗',
163+
color: magenta,
164+
customCommand:
165+
'npm exec degit hi-ogawa/vite-plugins/packages/rsc/examples/starter TARGET_DIR',
166+
},
160167
],
161168
},
162169
{
@@ -242,7 +249,7 @@ const FRAMEWORKS: Framework[] = [
242249
display: 'TanStack Router ↗',
243250
color: cyan,
244251
customCommand:
245-
'npm create -- tsrouter-app@latest TARGET_DIR --framework solid --interactive',
252+
'npm create -- tsrouter-app@latest TARGET_DIR --framework Solid --interactive',
246253
},
247254
],
248255
},
@@ -358,7 +365,7 @@ async function init() {
358365
placeholder: defaultTargetDir,
359366
})
360367
if (prompts.isCancel(projectName)) return cancel()
361-
targetDir = formatTargetDir(projectName as string)
368+
targetDir = formatTargetDir(projectName as string) || defaultTargetDir
362369
}
363370

364371
// 2. Handle directory if exist and not empty
@@ -613,7 +620,7 @@ function pkgFromUserAgent(userAgent: string | undefined): PkgInfo | undefined {
613620

614621
function setupReactSwc(root: string, isTs: boolean) {
615622
// renovate: datasource=npm depName=@vitejs/plugin-react-swc
616-
const reactSwcPluginVersion = '3.10.1'
623+
const reactSwcPluginVersion = '3.10.2'
617624

618625
editFile(path.resolve(root, 'package.json'), (content) => {
619626
return content.replace(

packages/create-vite/template-preact-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"preact": "^10.26.8"
12+
"preact": "^10.26.9"
1313
},
1414
"devDependencies": {
1515
"@preact/preset-vite": "^2.10.1",

packages/create-vite/template-preact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"preact": "^10.26.8"
12+
"preact": "^10.26.9"
1313
},
1414
"devDependencies": {
1515
"@preact/preset-vite": "^2.10.1",

packages/create-vite/template-react-ts/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"react-dom": "^19.1.0"
1515
},
1616
"devDependencies": {
17-
"@eslint/js": "^9.28.0",
18-
"@types/react": "^19.1.6",
17+
"@eslint/js": "^9.29.0",
18+
"@types/react": "^19.1.8",
1919
"@types/react-dom": "^19.1.6",
20-
"@vitejs/plugin-react": "^4.5.1",
21-
"eslint": "^9.28.0",
20+
"@vitejs/plugin-react": "^4.5.2",
21+
"eslint": "^9.29.0",
2222
"eslint-plugin-react-hooks": "^5.2.0",
2323
"eslint-plugin-react-refresh": "^0.4.20",
2424
"globals": "^16.2.0",
2525
"typescript": "~5.8.3",
26-
"typescript-eslint": "^8.33.1",
26+
"typescript-eslint": "^8.34.0",
2727
"vite": "npm:rolldown-vite@^6.3.21"
2828
}
2929
}

0 commit comments

Comments
 (0)