Skip to content

Commit 50c2dc0

Browse files
committed
fix: don't parse file paths as urls
fixes #324
1 parent 9b71994 commit 50c2dc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vite-plugin/src/importPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { extname } from 'path'
22
import { Plugin } from 'vite'
33
import { generateImports, Options } from '@vuetify/loader-shared'
4-
import { parse as parseUrl, URLSearchParams } from 'url'
4+
import { URLSearchParams } from 'url'
55

66
function parseId (id: string) {
7-
const { query, pathname } = parseUrl(id)
7+
const [pathname, query] = id.split('?')
88

99
return {
1010
query: query ? Object.fromEntries(new URLSearchParams(query)) : null,

0 commit comments

Comments
 (0)