From 83f0a785a2ae48d6761fb69f4b0523a24ae9342c Mon Sep 17 00:00:00 2001
From: RoomWithOutRoof <166608075+Jah-yee@users.noreply.github.com>
Date: Thu, 23 Apr 2026 11:58:23 +0800
Subject: [PATCH 1/9] fix(css): show filename in CSS minification warnings for
`.css?inline` (#22292)
---
packages/vite/src/node/plugins/css.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts
index 3188e3a7c42c00..c368a7c73ce3d5 100644
--- a/packages/vite/src/node/plugins/css.ts
+++ b/packages/vite/src/node/plugins/css.ts
@@ -622,7 +622,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
} else if (inlined) {
let content = css
if (config.build.cssMinify) {
- content = await minifyCSS(content, config, true)
+ content = await minifyCSS(content, config, true, id)
}
code = `export default ${JSON.stringify(content)}`
} else {
@@ -2202,6 +2202,7 @@ async function minifyCSS(
css: string,
config: ResolvedConfig,
inlined: boolean,
+ filename: string = defaultCssBundleName,
) {
// We want inlined CSS to not end with a linebreak, while ensuring that
// regular CSS assets do end with a linebreak.
@@ -2213,6 +2214,7 @@ async function minifyCSS(
const { code, warnings } = await transform(css, {
loader: 'css',
target: config.build.cssTarget || undefined,
+ sourcefile: filename,
...resolveMinifyCssEsbuildOptions(config.esbuild || {}),
})
if (warnings.length) {
@@ -2239,9 +2241,7 @@ async function minifyCSS(
...config.css.lightningcss,
targets: convertTargets(config.build.cssTarget),
cssModules: undefined,
- // TODO: Pass actual filename here, which can also be passed to esbuild's
- // `sourcefile` option below to improve error messages
- filename: defaultCssBundleName,
+ filename,
code: Buffer.from(css),
minify: true,
})
From ac36eb6907107734ff011413efea248b9f775373 Mon Sep 17 00:00:00 2001
From: dalaoshu <165626830+shulaoda@users.noreply.github.com>
Date: Thu, 23 Apr 2026 12:00:31 +0800
Subject: [PATCH 2/9] test(glob-import): add backslash-escaped glob pattern
test (#22283)
---
.../glob-import/__tests__/glob-import.spec.ts | 10 ++++++++++
playground/glob-import/index.html | 13 +++++++++++++
2 files changed, 23 insertions(+)
diff --git a/playground/glob-import/__tests__/glob-import.spec.ts b/playground/glob-import/__tests__/glob-import.spec.ts
index 1944ae249b9b04..005edcbef70669 100644
--- a/playground/glob-import/__tests__/glob-import.spec.ts
+++ b/playground/glob-import/__tests__/glob-import.spec.ts
@@ -311,6 +311,16 @@ test('escapes special chars in globs without mangling user supplied glob suffix'
.toEqual(expectedNames)
})
+test('escape literal parenthesis in glob pattern', async () => {
+ // https://github.com/vitejs/vite/issues/22166
+ // Backslash-escaped parens must match literal "(" / ")" in both dev and build.
+ await expect
+ .poll(async () =>
+ JSON.parse(await page.textContent('.escape-literal-parenthesis')),
+ )
+ .toStrictEqual(['/escape/(parenthesis)/mod/index.js'])
+})
+
test('subpath imports', async () => {
await expect
.poll(async () => await page.textContent('.subpath-imports'))
diff --git a/playground/glob-import/index.html b/playground/glob-import/index.html
index 2c211774e58769..998597aa44a261 100644
--- a/playground/glob-import/index.html
+++ b/playground/glob-import/index.html
@@ -21,6 +21,8 @@
Escape relative glob
Escape alias glob
+Escape literal parenthesis
+
Subpath imports
Subpath imports (sub dir)
@@ -150,6 +152,17 @@ Base
document.querySelector('.escape-alias').textContent = alias.sort().join('\n')
+
+
+Array Pattern with Sibling Directories Sharing a Prefix
+
+
+
+
Transform visibility
From 79d5a93a4f3f6cac81c52ed02fc86627696da677 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 23 Apr 2026 13:26:16 +0900
Subject: [PATCH 4/9] chore(deps): update pnpm/action-setup action to v6
(#22222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
.github/workflows/ci.yml | 4 ++--
.github/workflows/copilot-setup-steps.yml | 2 +-
.github/workflows/preview-release.yml | 2 +-
.github/workflows/publish.yml | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f13ec7ad3b7159..00282ce0786edf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -78,7 +78,7 @@ jobs:
uses: actions/checkout@v6
- name: Install pnpm
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v6
@@ -151,7 +151,7 @@ jobs:
- uses: actions/checkout@v6
- name: Install pnpm
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Set node version to 24
uses: actions/setup-node@v6
diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml
index 4ac1818039d6c2..97cbc2abac0ca1 100644
--- a/.github/workflows/copilot-setup-steps.yml
+++ b/.github/workflows/copilot-setup-steps.yml
@@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v6
- name: Install pnpm
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Set node version to 24
uses: actions/setup-node@v6
diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml
index 15832504c1c93a..026d08b79e2526 100644
--- a/.github/workflows/preview-release.yml
+++ b/.github/workflows/preview-release.yml
@@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v6
- name: Install pnpm
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Set node version to 24
uses: actions/setup-node@v6
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b10ab7d97162ab..290e0bf025ee2b 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v6
- name: Install pnpm
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Set node version to 24
uses: actions/setup-node@v6
From a4d828f2d5ed85440bc0774eab342e6f9a5e5f62 Mon Sep 17 00:00:00 2001
From: XinHallow
Date: Thu, 23 Apr 2026 12:29:24 +0800
Subject: [PATCH 5/9] fix: `hmrClient.logger.debug` and
`hmrClient.logger.error` looked different from other HMR logs (#22147)
---
.../src/node/ssr/runtime/serverModuleRunner.ts | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/packages/vite/src/node/ssr/runtime/serverModuleRunner.ts b/packages/vite/src/node/ssr/runtime/serverModuleRunner.ts
index 71a3610f4b6c0e..e7aa2fd07a196e 100644
--- a/packages/vite/src/node/ssr/runtime/serverModuleRunner.ts
+++ b/packages/vite/src/node/ssr/runtime/serverModuleRunner.ts
@@ -42,8 +42,21 @@ function createHMROptions(
return false
}
if (!('api' in environment.hot)) return false
+
+ const defaultLogger: ModuleRunnerHmr['logger'] = {
+ debug: (...msg) =>
+ environment.logger.info(msg.join(' '), {
+ timestamp: true,
+ }),
+ error: (err) =>
+ environment.logger.error(
+ err instanceof Error ? err.message : String(err),
+ { timestamp: true },
+ ),
+ }
+
return {
- logger: options.hmr?.logger,
+ logger: options.hmr?.logger ?? defaultLogger,
}
}
From 1ac46d64b81e0ac12b4df1ed28fd91cee1fd5f0b Mon Sep 17 00:00:00 2001
From: lijianan <574980606@qq.com>
Date: Thu, 23 Apr 2026 13:00:33 +0800
Subject: [PATCH 6/9] fix(create-vite): use `type="button"` to counter button
in templates consistently (#22142)
---
packages/create-vite/template-lit-ts/src/my-element.ts | 7 ++++++-
packages/create-vite/template-lit/src/my-element.js | 7 ++++++-
packages/create-vite/template-preact-ts/src/app.tsx | 6 +++++-
packages/create-vite/template-preact/src/app.jsx | 6 +++++-
packages/create-vite/template-qwik-ts/src/app.tsx | 2 +-
packages/create-vite/template-qwik/src/app.jsx | 2 +-
packages/create-vite/template-react-ts/src/App.tsx | 1 +
packages/create-vite/template-react/src/App.jsx | 1 +
packages/create-vite/template-solid-ts/src/App.tsx | 6 +++++-
packages/create-vite/template-solid/src/App.jsx | 6 +++++-
.../create-vite/template-svelte-ts/src/lib/Counter.svelte | 2 +-
.../create-vite/template-svelte/src/lib/Counter.svelte | 2 +-
.../template-vue-ts/src/components/HelloWorld.vue | 4 +++-
.../create-vite/template-vue/src/components/HelloWorld.vue | 4 +++-
14 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/packages/create-vite/template-lit-ts/src/my-element.ts b/packages/create-vite/template-lit-ts/src/my-element.ts
index ae1a86f9a12fbe..d02bc8d9c8b30a 100644
--- a/packages/create-vite/template-lit-ts/src/my-element.ts
+++ b/packages/create-vite/template-lit-ts/src/my-element.ts
@@ -33,7 +33,12 @@ export class MyElement extends LitElement {
HMR
-