Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
include:
# Active LTS + other OS
- os: macos-latest
node_version: 22
node_version: 24
- os: windows-latest
node_version: 22
node_version: 24
fail-fast: false

name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
Expand Down Expand Up @@ -146,17 +146,17 @@ jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint: node-22, ubuntu-latest"
name: "Lint: node-24, ubuntu-latest"
steps:
- uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Set node version to 22
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: "pnpm"

- name: Install deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Set node version to 22
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: "pnpm"

- name: Install deps
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/ecosystem-ci-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
issues: write # to add / delete reactions, post comments
pull-requests: write # to read PR data, and to add labels
actions: read # to check workflow status
contents: read # to clone the repo
steps:
- name: Check User Permissions
uses: actions/github-script@v8
Expand Down Expand Up @@ -230,12 +229,6 @@ jobs:
console.log('Removed "rocket" reaction.')
}

- name: Checkout
uses: actions/checkout@v5
with:
ref: refs/pull/${{ fromJSON(steps.get-pr-data.outputs.result).num }}/head
fetch-depth: 0

- name: Trigger Downstream Workflow
uses: actions/github-script@v8
id: trigger
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Set node version to 22
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
registry-url: https://registry.npmjs.org/
# disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning)
package-manager-cache: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Set node version to 22
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
registry-url: https://registry.npmjs.org/
# disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning)
package-manager-cache: false
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build.environment]
NODE_VERSION = "22"
NODE_VERSION = "24"
# don't need playwright for docs build
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1"
[build]
Expand Down
14 changes: 14 additions & 0 deletions packages/vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [7.2.0-beta.1](https://github.com/vitejs/vite/compare/v7.2.0-beta.0...v7.2.0-beta.1) (2025-10-29)
### Bug Fixes

* increase stream reset rate limit for HTTP2 ([#21024](https://github.com/vitejs/vite/issues/21024)) ([4f44f22](https://github.com/vitejs/vite/commit/4f44f22f7f4595d74c76778bd522387138775055))
* **optimizer:** externalize virtual modules for html like files ([#21001](https://github.com/vitejs/vite/issues/21001)) ([e5af352](https://github.com/vitejs/vite/commit/e5af352d8e1a9f187159137f836db5bedbd68a66))

### Documentation

* clarify the values are escaped automatically ([#21017](https://github.com/vitejs/vite/issues/21017)) ([246df13](https://github.com/vitejs/vite/commit/246df134dd58441e1e40dd361cf42419d05ea7a5))

### Code Refactoring

* use `fs.cpSync` ([#21019](https://github.com/vitejs/vite/issues/21019)) ([a2df778](https://github.com/vitejs/vite/commit/a2df77812814b927880bc4d68aafa8c8fa47daf0))

## [7.2.0-beta.0](https://github.com/vitejs/vite/compare/v7.1.11...v7.2.0-beta.0) (2025-10-28)
### Features

Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite",
"version": "7.2.0-beta.0",
"version": "7.2.0-beta.1",
"type": "module",
"license": "MIT",
"author": "Evan You",
Expand Down
4 changes: 4 additions & 0 deletions packages/vite/src/node/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export async function resolveHttpServer(
// Manually increase the session memory to prevent 502 ENHANCE_YOUR_CALM
// errors on large numbers of requests
maxSessionMemory: 1000,
// Increase the stream reset rate limit to prevent net::ERR_HTTP2_PROTOCOL_ERROR
// errors on large numbers of requests
streamResetBurst: 100000,
streamResetRate: 33,
...httpsOptions,
allowHTTP1: true,
},
Expand Down
3 changes: 3 additions & 0 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ function esbuildScanPlugin(
isOptimizable(resolved, optimizeDepsOptions)
)
return
if (shouldExternalizeDep(resolved, path)) {
return externalUnlessEntry({ path })
}
return {
path: resolved,
namespace: 'html',
Expand Down
17 changes: 17 additions & 0 deletions playground/optimize-deps/__tests__/optimize-deps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,20 @@ test('dependency with external sub-dependencies', async () => {
.poll(() => page.textContent('.dep-cjs-with-external-deps-node-builtin'))
.toBe('foo bar')
})

test('virtual module with .vue extension does not error during scan', async () => {
await expect.poll(() => page.textContent('.virtual-module-vue')).toBe('ok')
})

test.runIf(isServe)(
'no dep scan error for virtual modules with html-like extensions',
() => {
// Check that there are no errors related to virtual modules during dep scan
const scanErrors = serverLogs.filter(
(log) =>
log.includes('Failed to scan for dependencies') &&
log.includes('virtual:'),
)
expect(scanErrors).toHaveLength(0)
},
)
13 changes: 13 additions & 0 deletions playground/optimize-deps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,16 @@ <h2>Pre-bundle dependency with external sub-dependencies</h2>
optimized.externalDummyNodeBuiltinResult,
)
</script>

<h2>Virtual module with .vue extension</h2>
<div>
This should not error during dep scan:
<span class="virtual-module-vue"></span>
</div>
<script type="module">
import VirtualComponent from 'virtual:test-virtual-file/Foo.vue'
text(
'.virtual-module-vue',
`${VirtualComponent.name === 'VirtualComponent' ? 'ok' : 'ng'}`,
)
</script>
22 changes: 21 additions & 1 deletion playground/optimize-deps/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default defineConfig({
plugins: [
testVue(),
notjs(),
virtualModulePlugin(),
// for axios request test
{
name: 'mock',
Expand Down Expand Up @@ -130,7 +131,7 @@ export default defineComponent({
}

// fallback to empty module for other vue files
if (id.endsWith('.vue')) {
if (!id.startsWith('\0') && id.endsWith('.vue')) {
return { code: `export default {}` }
}
},
Expand Down Expand Up @@ -172,3 +173,22 @@ function notjs() {
},
}
}

function virtualModulePlugin() {
const virtualModuleId = 'virtual:test-virtual-file/Foo.vue'
const resolvedVirtualModuleId = '\0' + virtualModuleId

return {
name: 'test-virtual-module',
resolveId(id) {
if (id === virtualModuleId) {
return resolvedVirtualModuleId
}
},
load(id) {
if (id === resolvedVirtualModuleId) {
return `export default { name: 'VirtualComponent' }`
}
},
}
}
Loading