Skip to content

Commit 02dd3ca

Browse files
committed
Merge branch 'main' into fix-execution-order-of-re-export
2 parents f13daf8 + 3db608a commit 02dd3ca

File tree

117 files changed

+1974
-1620
lines changed

Some content is hidden

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

117 files changed

+1974
-1620
lines changed

.github/renovate.json5

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,20 @@
2727
// pinned
2828
"slash3",
2929
"slash5",
30-
"vue32",
30+
"vue34",
3131

3232
// breaking changes
3333
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)
3434
],
35+
"github-actions": {
36+
"fileMatch": [
37+
// default values
38+
"(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$",
39+
"(^|/)action\\.ya?ml$",
40+
// custom value
41+
"(^|/)docs/guide/static-deploy-github-pages\\.yaml$",
42+
],
43+
},
3544
"customManagers": [
3645
{
3746
"customType": "regex",

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
hoist-pattern[]=postcss # package/vite
22
hoist-pattern[]=pug # playground/tailwind: @vue/compiler-sfc
3+
hoist-pattern[]=eslint-import-resolver-* # eslint-plugin-import-x
34
shell-emulator=true
45
auto-install-peers=false
56
dedupe-injected-deps=false

CONTRIBUTING.md

Lines changed: 69 additions & 63 deletions
Large diffs are not rendered by default.

docs/guide/rolldown.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Vite is planning to integrate [Rolldown](https://rolldown.rs), a Rust-powered JavaScript bundler, to improve build performance and capabilities.
44

5+
<YouTubeVideo videoId="RRjfm8cMveQ" />
6+
57
## What is Rolldown?
68

79
Rolldown is a modern, high-performance JavaScript bundler written in Rust. It's designed as a drop-in replacement for Rollup, aiming to provide significant performance improvements while maintaining compatibility with the existing ecosystem.
@@ -30,7 +32,18 @@ For additional insights on the motivations behind Rolldown, see the [reasons why
3032

3133
## How to Try Rolldown
3234

33-
The rolldown-powered version of Vite is currently available as a separate package called `rolldown-vite`. You can try it by adding package overrides to your `package.json`:
35+
The rolldown-powered version of Vite is currently available as a separate package called `rolldown-vite`. If you have `vite` as a direct dependency, you can alias the `vite` package to `rolldown-vite` in your project's `package.json`, which should result in a drop-in replacement.
36+
37+
```json
38+
{
39+
"dependencies": {
40+
"vite": "^6.0.0" // [!code --]
41+
"vite": "npm:rolldown-vite@latest" // [!code ++]
42+
}
43+
}
44+
```
45+
46+
If you use a Vitepress or a meta framework that has Vite as peer dependency, you have to override the `vite` dependency in your `package.json`, which works slightly different depending on your package manager:
3447

3548
:::code-group
3649

@@ -86,12 +99,39 @@ Rolldown throws an error when unknown or invalid options are passed. Because som
8699
87100
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.
88101

89-
## Enabling Native Plugins
102+
## Performance
103+
104+
`rolldown-vite` is focused on ensuring compatibility with the existing ecosystem, so defaults are geared towards a smooth transition. You can get further performance gains by switching over to faster Rust-based internal plugins and other customizations.
105+
106+
### Enabling Native Plugins
90107

91108
Thanks to Rolldown and Oxc, various internal Vite plugins, such as the alias or resolve plugin, have been converted to Rust. At the time of writing, using these plugins is not enabled by default, as their behavior may differ from the JavaScript versions.
92109

93110
To test them, you can set the `experimental.enableNativePlugin` option to `true` in your Vite config.
94111

112+
### `withFilter` Wrapper
113+
114+
Plugin authors have the option to use the [hook filter feature](#hook-filter-feature) to reduce the communication overhead between the Rust and JavaScript runtimes.
115+
But in case some of the used plugins are not using this feature (yet) but you still want to benefit from it, you can use the `withFilter` wrapper to wrap the plugin with a filter yourself.
116+
117+
```js
118+
// In your vite.config.ts
119+
import { withFilter, defineConfig } from 'vite'
120+
import svgr from 'vite-plugin-svgr'
121+
122+
export default defineConfig({
123+
plugins: [
124+
// Load the `svgr` plugin only for files which end in `.svg?react`
125+
withFilter(
126+
svgr({
127+
/*...*/
128+
}),
129+
{ load: { id: /\.svg?react$/ } },
130+
),
131+
],
132+
})
133+
```
134+
95135
## Reporting Issues
96136

97137
Since this is an experimental integration, you may encounter issues. If you do, please report them in the [`vitejs/rolldown-vite`](https://github.com/vitejs/rolldown-vite) repository, **not the main Vite repository**.
@@ -104,6 +144,12 @@ When [reporting issues](https://github.com/vitejs/rolldown-vite/issues/new), ple
104144

105145
For real-time discussions and troubleshooting, make sure to join the [Rolldown Discord](https://chat.rolldown.rs/).
106146

147+
## Versioning Policy
148+
149+
The versioning policy for `rolldown-vite` aligns its major and minor versions with those of the normal Vite package. This synchronization ensures that features present in a specific normal Vite minor release are also included in the corresponding `rolldown-vite` minor release. However, it's important to note that patch versions are not synchronized between the two projects. If you're wondering whether a specific change from normal Vite has been included in `rolldown-vite`, you can always check [`rolldown-vite`'s separate changelog](https://github.com/vitejs/rolldown-vite/blob/rolldown-vite/packages/vite/CHANGELOG.md) for confirmation.
150+
151+
Furthermore, please be aware that `rolldown-vite` itself is considered experimental. Due to its experimental nature, breaking changes might be introduced even within its patch versions. Additionally, please note that `rolldown-vite` only receives updates for its most recent minor version. Even for important security or bug fixes, patches are not created for older major or minor versions.
152+
107153
## Future Plans
108154

109155
The `rolldown-vite` package is a temporary solution to gather feedback and stabilize the Rolldown integration. In the future, this functionality will be merged back into the main Vite repository.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Imported in static-deploy.md
2+
# This file is extracted as a separate file so that renovate can update the action versions
3+
#
4+
#region content
5+
# Simple workflow for deploying static content to GitHub Pages
6+
name: Deploy static content to Pages
7+
8+
on:
9+
# Runs on pushes targeting the default branch
10+
push:
11+
branches: ['main']
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow one concurrent deployment
23+
concurrency:
24+
group: 'pages'
25+
cancel-in-progress: true
26+
27+
jobs:
28+
# Single deploy job since we're just deploying
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
- name: Set up Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: lts/*
41+
cache: 'npm'
42+
- name: Install dependencies
43+
run: npm ci
44+
- name: Build
45+
run: npm run build
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v5
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
# Upload dist folder
52+
path: './dist'
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4
56+
#endregion content

docs/guide/static-deploy.md

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -63,59 +63,7 @@ Now the `preview` command will launch the server at `http://localhost:8080`.
6363

6464
2. Go to your GitHub Pages configuration in the repository settings page and choose the source of deployment as "GitHub Actions", this will lead you to create a workflow that builds and deploys your project, a sample workflow that installs dependencies and builds using npm is provided:
6565

66-
```yml
67-
# Simple workflow for deploying static content to GitHub Pages
68-
name: Deploy static content to Pages
69-
70-
on:
71-
# Runs on pushes targeting the default branch
72-
push:
73-
branches: ['main']
74-
75-
# Allows you to run this workflow manually from the Actions tab
76-
workflow_dispatch:
77-
78-
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
79-
permissions:
80-
contents: read
81-
pages: write
82-
id-token: write
83-
84-
# Allow one concurrent deployment
85-
concurrency:
86-
group: 'pages'
87-
cancel-in-progress: true
88-
89-
jobs:
90-
# Single deploy job since we're just deploying
91-
deploy:
92-
environment:
93-
name: github-pages
94-
url: ${{ steps.deployment.outputs.page_url }}
95-
runs-on: ubuntu-latest
96-
steps:
97-
- name: Checkout
98-
uses: actions/checkout@v4
99-
- name: Set up Node
100-
uses: actions/setup-node@v4
101-
with:
102-
node-version: 20
103-
cache: 'npm'
104-
- name: Install dependencies
105-
run: npm ci
106-
- name: Build
107-
run: npm run build
108-
- name: Setup Pages
109-
uses: actions/configure-pages@v4
110-
- name: Upload artifact
111-
uses: actions/upload-pages-artifact@v3
112-
with:
113-
# Upload dist folder
114-
path: './dist'
115-
- name: Deploy to GitHub Pages
116-
id: deployment
117-
uses: actions/deploy-pages@v4
118-
```
66+
<<< ./static-deploy-github-pages.yaml#content
11967

12068
## GitLab Pages and GitLab CI
12169

@@ -128,7 +76,7 @@ Now the `preview` command will launch the server at `http://localhost:8080`.
12876
2. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:
12977

13078
```yaml [.gitlab-ci.yml]
131-
image: node:16.5.0
79+
image: node:lts
13280
pages:
13381
stage: deploy
13482
cache:

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@types/express": "^4.17.21",
1313
"feed": "^4.2.2",
1414
"vitepress": "^1.6.3",
15-
"vitepress-plugin-group-icons": "^1.3.7",
15+
"vitepress-plugin-group-icons": "^1.5.2",
1616
"vitepress-plugin-llms": "^1.1.0",
1717
"vue": "^3.5.13"
1818
}

eslint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ export default tseslint.config(
220220
},
221221
},
222222
{
223-
name: 'playground/test',
224-
files: ['playground/**/__tests__/**/*.?([cm])[jt]s?(x)'],
223+
name: 'tests',
224+
files: ['**/__tests__/**/*.?([cm])[jt]s?(x)'],
225225
rules: {
226226
'n/no-unsupported-features/node-builtins': [
227227
'error',
228228
{
229229
// ideally we would like to allow all experimental features
230230
// https://github.com/eslint-community/eslint-plugin-n/issues/199
231-
ignores: ['fetch'],
231+
ignores: ['fetch', 'import.meta.dirname'],
232232
},
233233
],
234234
},

package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,43 +40,43 @@
4040
"ci-docs": "pnpm build && pnpm docs-build"
4141
},
4242
"devDependencies": {
43-
"@eslint/js": "^9.22.0",
43+
"@eslint/js": "^9.25.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",
50-
"@types/estree": "^1.0.6",
50+
"@types/estree": "^1.0.7",
5151
"@types/etag": "^1.8.3",
5252
"@types/less": "^3.0.8",
5353
"@types/node": "^22.13.6",
5454
"@types/picomatch": "^4.0.0",
5555
"@types/stylus": "^0.48.43",
56-
"@types/ws": "^8.18.0",
57-
"@vitejs/release-scripts": "^1.3.3",
56+
"@types/ws": "^8.18.1",
57+
"@vitejs/release-scripts": "^1.5.0",
5858
"conventional-changelog-cli": "^5.0.0",
59-
"eslint": "^9.22.0",
60-
"eslint-plugin-import-x": "^4.8.0",
61-
"eslint-plugin-n": "^17.16.2",
59+
"eslint": "^9.25.0",
60+
"eslint-plugin-import-x": "^4.10.6",
61+
"eslint-plugin-n": "^17.17.0",
6262
"eslint-plugin-regexp": "^2.7.0",
6363
"execa": "^9.5.2",
6464
"globals": "^16.0.0",
6565
"gsap": "^3.12.7",
66-
"lint-staged": "^15.5.0",
66+
"lint-staged": "^15.5.1",
6767
"picocolors": "^1.1.1",
6868
"playwright-chromium": "^1.50.1",
6969
"premove": "^4.0.0",
7070
"prettier": "3.5.3",
7171
"rollup": "^4.34.9",
7272
"rollup-plugin-esbuild": "^6.2.1",
73-
"simple-git-hooks": "^2.11.1",
73+
"simple-git-hooks": "^2.12.1",
7474
"tslib": "^2.8.1",
7575
"tsx": "^4.19.3",
7676
"typescript": "~5.7.2",
77-
"typescript-eslint": "^8.26.1",
77+
"typescript-eslint": "^8.30.1",
7878
"vite": "workspace:*",
79-
"vitest": "^3.0.8"
79+
"vitest": "^3.1.1"
8080
},
8181
"simple-git-hooks": {
8282
"pre-commit": "pnpm exec lint-staged --concurrent false"
@@ -95,7 +95,7 @@
9595
"eslint --cache --fix"
9696
]
9797
},
98-
"packageManager": "pnpm@10.6.3",
98+
"packageManager": "pnpm@10.8.1",
9999
"pnpm": {
100100
"overrides": {
101101
"vite": "workspace:*"
@@ -104,8 +104,7 @@
104104
105105
106106
107-
108-
107+
109108
},
110109
"peerDependencyRules": {
111110
"allowedVersions": {

packages/create-vite/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## <small>6.4.1 (2025-04-17)</small>
2+
3+
* docs(create-vite): update react template README files (#19876) ([2d4c20e](https://github.com/vitejs/vite/commit/2d4c20ebadc35dae7327ffe6cba85cc5c36d579a)), closes [#19876](https://github.com/vitejs/vite/issues/19876)
4+
* fix(create-vite): adding an interactive flag to force interactivity (#19875) ([608457c](https://github.com/vitejs/vite/commit/608457cd03ce593492abfe007e20468387c4c895)), closes [#19875](https://github.com/vitejs/vite/issues/19875)
5+
6+
7+
8+
## 6.4.0 (2025-04-16)
9+
10+
* feat(create-vite): add TanStack Router commands (#19573) ([e49a3b5](https://github.com/vitejs/vite/commit/e49a3b523c8894e8e0df766642999a944e0148ef)), closes [#19573](https://github.com/vitejs/vite/issues/19573)
11+
* fix(deps): update all non-major dependencies (#19555) ([f612e0f](https://github.com/vitejs/vite/commit/f612e0fdf6810317b61fcca1ded125755f261d78)), closes [#19555](https://github.com/vitejs/vite/issues/19555)
12+
* fix(deps): update all non-major dependencies (#19613) ([363d691](https://github.com/vitejs/vite/commit/363d691b4995d72f26a14eb59ed88a9483b1f931)), closes [#19613](https://github.com/vitejs/vite/issues/19613)
13+
* fix(deps): update all non-major dependencies (#19649) ([f4e712f](https://github.com/vitejs/vite/commit/f4e712ff861f8a9504594a4a5e6d35a7547e5a7e)), closes [#19649](https://github.com/vitejs/vite/issues/19649)
14+
* chore(deps): update dependency globals to v16 (#19556) ([e4bdd6b](https://github.com/vitejs/vite/commit/e4bdd6b9dd6e2ccf7d11e84a9c2da805e98eed58)), closes [#19556](https://github.com/vitejs/vite/issues/19556)
15+
* docs: remove $ prefix from create-vite terminal commands in README (#19532) ([cb9165c](https://github.com/vitejs/vite/commit/cb9165c1b2569aabe3e110e9684a909918eae22c)), closes [#19532](https://github.com/vitejs/vite/issues/19532)
16+
17+
18+
119
## <small>6.3.1 (2025-02-27)</small>
220

321
* fix(create-vite): make custom command visible (#19519) ([5ea9a42](https://github.com/vitejs/vite/commit/5ea9a422c5a000c6a3183c617d6c853cdc4a5151)), closes [#19519](https://github.com/vitejs/vite/issues/19519)

0 commit comments

Comments
 (0)