+ import with ?url
+
+ URL of Null.vue: {{ url }}
+
+
diff --git a/playground/vue/__tests__/vue.spec.ts b/playground/vue/__tests__/vue.spec.ts
index 51dbf82a480aff..2fe537e6135a00 100644
--- a/playground/vue/__tests__/vue.spec.ts
+++ b/playground/vue/__tests__/vue.spec.ts
@@ -263,3 +263,11 @@ describe('vue worker', () => {
expect(await page.textContent('.vue-worker')).toMatch('worker load!')
})
})
+
+describe('import with ?url', () => {
+ test('should work', async () => {
+ expect(await page.textContent('.import-with-url-query')).toMatch(
+ isBuild ? /^data:/ : '/Null.vue'
+ )
+ })
+})
diff --git a/playground/vue/tsconfig.json b/playground/vue/tsconfig.json
index 5f90cb166d696b..bdc0eedc2244af 100644
--- a/playground/vue/tsconfig.json
+++ b/playground/vue/tsconfig.json
@@ -3,5 +3,5 @@
// esbuild transpile should ignore this
"target": "ES5"
},
- "include": ["src"]
+ "include": ["."]
}
diff --git a/playground/vue/vite-env.d.ts b/playground/vue/vite-env.d.ts
new file mode 100644
index 00000000000000..11f02fe2a0061d
--- /dev/null
+++ b/playground/vue/vite-env.d.ts
@@ -0,0 +1 @@
+///