Skip to content

Commit 52e5a1b

Browse files
authored
refactor: remove deprecated env api properties (#19986)
1 parent 00b8a98 commit 52e5a1b

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

packages/vite/src/node/baseEnvironment.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ export class PartialEnvironment {
3131

3232
config: ResolvedConfig & ResolvedEnvironmentOptions
3333

34-
/**
35-
* @deprecated use environment.config instead
36-
**/
37-
get options(): ResolvedEnvironmentOptions {
38-
return this._options
39-
}
40-
4134
logger: Logger
4235

4336
/**

packages/vite/src/node/optimizer/scan.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,6 @@ export function devToScanEnvironment(
8585
getTopLevelConfig() {
8686
return environment.getTopLevelConfig()
8787
},
88-
/**
89-
* @deprecated use environment.config instead
90-
**/
91-
get options() {
92-
return environment.options
93-
},
9488
get config() {
9589
return environment.config
9690
},

packages/vite/src/node/server/hmr.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ export interface HotUpdateOptions {
5353
modules: Array<EnvironmentModuleNode>
5454
read: () => string | Promise<string>
5555
server: ViteDevServer
56-
57-
/**
58-
* @deprecated use this.environment in the hotUpdate hook instead
59-
**/
60-
environment: DevEnvironment
6156
}
6257

6358
export interface HmrContext {
@@ -446,8 +441,6 @@ export async function handleHMRUpdate(
446441
const options = {
447442
...contextMeta,
448443
modules: [...mods],
449-
// later on hotUpdate will be called for each runtime with a new HotUpdateOptions
450-
environment,
451444
}
452445
hotMap.set(environment, { options })
453446
}

0 commit comments

Comments
 (0)