diff --git a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts index 706998c288fa50..f8f937c628ba68 100644 --- a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -87,3 +87,7 @@ test('import from hidden dir', async () => { test('import optimize-excluded package that imports optimized-included package', async () => { expect(await page.textContent('.nested-include')).toBe('nested-include') }) + +test('variable names are reused in different scripts', async () => { + expect(await page.textContent('.reused-variable-names')).toBe('reused') +}) diff --git a/packages/playground/optimize-deps/index.html b/packages/playground/optimize-deps/index.html index dfb274656f1baf..62541e0525a9b4 100644 --- a/packages/playground/optimize-deps/index.html +++ b/packages/playground/optimize-deps/index.html @@ -53,6 +53,15 @@