()
const isExcludedUrl = (url: string) =>
diff --git a/playground/html/.env b/playground/html/.env
index 61dfca27f1b4a4..a94d8ee1e130c5 100644
--- a/playground/html/.env
+++ b/playground/html/.env
@@ -1 +1,2 @@
VITE_FOO=bar
+VITE_FAVICON_URL=/sprite.svg
diff --git a/playground/html/__tests__/html.spec.ts b/playground/html/__tests__/html.spec.ts
index afb8185621af69..39294f5510aa17 100644
--- a/playground/html/__tests__/html.spec.ts
+++ b/playground/html/__tests__/html.spec.ts
@@ -273,6 +273,11 @@ describe('env', () => {
expect(await page.textContent('.env-bar')).toBeTruthy()
expect(await page.textContent('.env-prod')).toBe(isBuild + '')
expect(await page.textContent('.env-dev')).toBe(isServe + '')
+
+ const iconLink = await page.$('link[rel=icon]')
+ expect(await iconLink.getAttribute('href')).toBe(
+ `${isBuild ? './' : '/'}sprite.svg`,
+ )
})
})
diff --git a/playground/html/env.html b/playground/html/env.html
index a20c569096ee91..056377071c19fb 100644
--- a/playground/html/env.html
+++ b/playground/html/env.html
@@ -3,3 +3,4 @@
class name should be env-bar
%PROD%
%DEV%
+