Skip to content

Commit

Permalink
fix: don't parse file paths as urls
Browse files Browse the repository at this point in the history
fixes #324
  • Loading branch information
KaelWD committed Feb 28, 2024
1 parent 9b71994 commit 50c2dc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite-plugin/src/importPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { extname } from 'path'
import { Plugin } from 'vite'
import { generateImports, Options } from '@vuetify/loader-shared'
import { parse as parseUrl, URLSearchParams } from 'url'
import { URLSearchParams } from 'url'

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

return {
query: query ? Object.fromEntries(new URLSearchParams(query)) : null,
Expand Down

0 comments on commit 50c2dc0

Please sign in to comment.