File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
packages/vite/src/node/server Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ import { EnvironmentModuleGraph } from './moduleGraph'
2222import type { EnvironmentModuleNode } from './moduleGraph'
2323import type { HotChannel , NormalizedHotChannel } from './hmr'
2424import { getShortName , normalizeHotChannel , updateModules } from './hmr'
25- import type { TransformResult } from './transformRequest'
25+ import type {
26+ TransformOptionsInternal ,
27+ TransformResult ,
28+ } from './transformRequest'
2629import { transformRequest } from './transformRequest'
2730import type { EnvironmentPluginContainer } from './pluginContainer'
2831import {
@@ -206,8 +209,12 @@ export class DevEnvironment extends BaseEnvironment {
206209 }
207210 }
208211
209- transformRequest ( url : string ) : Promise < TransformResult | null > {
210- return transformRequest ( this , url )
212+ transformRequest (
213+ url : string ,
214+ /** @internal */
215+ options ?: TransformOptionsInternal ,
216+ ) : Promise < TransformResult | null > {
217+ return transformRequest ( this , url , options )
211218 }
212219
213220 async warmupRequest ( url : string ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -18,11 +18,7 @@ import {
1818 removeTimestampQuery ,
1919} from '../../utils'
2020import { send } from '../send'
21- import {
22- ERR_DENIED_ID ,
23- ERR_LOAD_URL ,
24- transformRequest ,
25- } from '../transformRequest'
21+ import { ERR_DENIED_ID , ERR_LOAD_URL } from '../transformRequest'
2622import { applySourcemapIgnoreList } from '../sourcemap'
2723import { isHTMLProxy } from '../../plugins/html'
2824import {
@@ -262,7 +258,7 @@ export function transformMiddleware(
262258 }
263259
264260 // resolve, load and transform using the plugin container
265- const result = await transformRequest ( environment , url , {
261+ const result = await environment . transformRequest ( url , {
266262 allowId ( id ) {
267263 return (
268264 id . startsWith ( '\0' ) ||
You can’t perform that action at this time.
0 commit comments