diff --git a/playground/glob-import/__tests__/glob-import.spec.ts b/playground/glob-import/__tests__/glob-import.spec.ts index d54d8364fc7c10..e2cf1f709fff7f 100644 --- a/playground/glob-import/__tests__/glob-import.spec.ts +++ b/playground/glob-import/__tests__/glob-import.spec.ts @@ -367,3 +367,14 @@ test('import.meta.glob and dynamic import vars transformations should be visible JSON.stringify({ globTransformed: true, dynamicImportTransformed: true }), ) }) + +test('absolute base with files outside of root', async () => { + await expect + .poll(async () => + JSON.parse(await page.textContent('.absolute-base-outside-root')), + ) + .toStrictEqual({ + '../external/x.js': 'hello from x', + '../external/y.js': 'hello from y', + }) +}) diff --git a/playground/glob-import/external/x.js b/playground/glob-import/external/x.js new file mode 100644 index 00000000000000..129881f202004a --- /dev/null +++ b/playground/glob-import/external/x.js @@ -0,0 +1 @@ +export const msg = 'hello from x' diff --git a/playground/glob-import/external/y.js b/playground/glob-import/external/y.js new file mode 100644 index 00000000000000..493ed577a33c85 --- /dev/null +++ b/playground/glob-import/external/y.js @@ -0,0 +1 @@ +export const msg = 'hello from y' diff --git a/playground/glob-import/root/index.html b/playground/glob-import/root/index.html index 52efd42debf111..5a155ee4dd072b 100644 --- a/playground/glob-import/root/index.html +++ b/playground/glob-import/root/index.html @@ -313,3 +313,19 @@

Transform visibility

document.querySelector('.transform-visibility').textContent = JSON.stringify(result) + +

Absolute base outside root

+

+
+