From 2ddfbf0a47a76f7012be03c12830d02c4b79fd99 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Tue, 13 Oct 2026 08:37:43 +0800 Subject: [PATCH] fix(resolve): update resolve.exports to 2.0.4 --- packages/vite/package.json | 2 +- playground/resolve/__tests__/resolve.spec.ts | 5 +++++ playground/resolve/imports-path/star/dollar$$.js | 1 + playground/resolve/index.html | 6 ++++++ pnpm-lock.yaml | 12 +++++++----- pnpm-workspace.yaml | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 playground/resolve/imports-path/star/dollar$$.js diff --git a/packages/vite/package.json b/packages/vite/package.json index d880ef340179ce..2cdf3cc10fd17b 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -120,7 +120,7 @@ "postcss-load-config": "^6.0.1", "postcss-modules": "^9.0.1", "premove": "^4.0.0", - "resolve.exports": "^2.0.3", + "resolve.exports": "^2.0.4", "rolldown-plugin-dts": "^0.28.6", "rollup": "^4.59.0", "rollup-plugin-license": "^3.7.1", diff --git a/playground/resolve/__tests__/resolve.spec.ts b/playground/resolve/__tests__/resolve.spec.ts index 04c53cf7e9a070..72c4e6ad26e608 100644 --- a/playground/resolve/__tests__/resolve.spec.ts +++ b/playground/resolve/__tests__/resolve.spec.ts @@ -219,6 +219,11 @@ test('Resolving star with imports filed', async () => { expect(await page.textContent('.imports-star')).toMatch('[success]') }) +// https://github.com/vitejs/vite/issues/23637 +test('Resolving star with $$ in filename with imports field', async () => { + expect(await page.textContent('.imports-star-dollar')).toMatch('[success]') +}) + test('Resolving slash with imports filed', async () => { expect(await page.textContent('.imports-slash')).toMatch('[success]') }) diff --git a/playground/resolve/imports-path/star/dollar$$.js b/playground/resolve/imports-path/star/dollar$$.js new file mode 100644 index 00000000000000..b59a9e179b9d6a --- /dev/null +++ b/playground/resolve/imports-path/star/dollar$$.js @@ -0,0 +1 @@ +export const msg = '[success] star with $$ in filename' diff --git a/playground/resolve/index.html b/playground/resolve/index.html index 963eb8f4012a12..8679c7733703b9 100644 --- a/playground/resolve/index.html +++ b/playground/resolve/index.html @@ -55,6 +55,9 @@
fail
+fail
+fail
@@ -264,6 +267,9 @@