Skip to content

Commit 21bca2f

Browse files
authored
fix: load virtual requests with ?v= query string (#252)
1 parent 9bf71d4 commit 21bca2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/vite-plugin/src/stylesPlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ export function stylesPlugin (options: Options): PluginOption {
171171
}
172172
},
173173
load (id) {
174-
if (id === '__void__' || id === '\0__void__') {
174+
// When Vite is configured with `optimizeDeps.exclude: ['vuetify']`, the
175+
// received id contains a version hash (e.g. \0__void__?v=893fa859).
176+
if (/^\0__void__(\?.*)?$/.test(id)) {
175177
return ''
176178
}
177179

0 commit comments

Comments
 (0)