File tree 1 file changed +3
-4
lines changed
packages/vite/src/node/plugins 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { ResolvedConfig } from '../config'
2
2
import { Plugin } from '../plugin'
3
3
import { resolvePlugins } from '../plugins'
4
- import { parse as parseUrl } from 'url'
5
- import qs , { ParsedUrlQuery } from 'querystring'
4
+ import { parse as parseUrl , URLSearchParams } from 'url'
6
5
import { fileToUrl , getAssetHash } from './asset'
7
6
import { cleanUrl , injectQuery } from '../utils'
8
7
import Rollup from 'rollup'
9
8
import { ENV_PUBLIC_PATH } from '../constants'
10
9
import path from 'path'
11
10
12
- function parseWorkerRequest ( id : string ) : ParsedUrlQuery | null {
11
+ function parseWorkerRequest ( id : string ) : Record < string , string > | null {
13
12
const { search } = parseUrl ( id )
14
13
if ( ! search ) {
15
14
return null
16
15
}
17
- return qs . parse ( search . slice ( 1 ) )
16
+ return Object . fromEntries ( new URLSearchParams ( search . slice ( 1 ) ) )
18
17
}
19
18
20
19
const WorkerFileId = 'worker_file'
You can’t perform that action at this time.
0 commit comments