From cb9fd210f8be7dc7241663492dc8bd8820cf5944 Mon Sep 17 00:00:00 2001 From: toshify <4579559+toshify@users.noreply.github.com> Date: Sat, 19 Mar 2022 10:54:53 +0100 Subject: [PATCH] fix: handle relative path glob raw import, fix #7307 Contain test within `glob-import`-folder Remove comments referencing issue number --- .../playground/glob-import/__tests__/glob-import.spec.ts | 6 +++--- packages/playground/glob-import/index.html | 7 +++---- packages/vite/src/node/importGlob.ts | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/playground/glob-import/__tests__/glob-import.spec.ts b/packages/playground/glob-import/__tests__/glob-import.spec.ts index 701ad5791ded23..ebdf6c0ab29193 100644 --- a/packages/playground/glob-import/__tests__/glob-import.spec.ts +++ b/packages/playground/glob-import/__tests__/glob-import.spec.ts @@ -66,9 +66,10 @@ const rawResult = { } } -// issue #7307 const relativeRawResult = { - '../dynamic-import/nested/shared.js': 'export const n = 1\n' + '../glob-import/dir/baz.json': { + msg: 'baz' + } } test('should work', async () => { @@ -86,7 +87,6 @@ test('import glob raw', async () => { ) }) -// issue #7307 test('import relative glob raw', async () => { expect(await page.textContent('.relative-glob-raw')).toBe( JSON.stringify(relativeRawResult, null, 2) diff --git a/packages/playground/glob-import/index.html b/packages/playground/glob-import/index.html index 3790e5928ee5eb..64f456aeb4d6a2 100644 --- a/packages/playground/glob-import/index.html +++ b/packages/playground/glob-import/index.html @@ -1,7 +1,7 @@

 

 

-
+