File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
15
15
future : {
16
16
removeServerModuleGraph : ' warn' ,
17
17
removeServerTransformRequest : ' warn' ,
18
+ removeServerWarmupRequest : ' warn' ,
18
19
}
19
20
```
20
21
Original file line number Diff line number Diff line change @@ -484,6 +484,7 @@ export interface FutureOptions {
484
484
removeServerModuleGraph ?: 'warn'
485
485
removeServerHot ?: 'warn'
486
486
removeServerTransformRequest ?: 'warn'
487
+ removeServerWarmupRequest ?: 'warn'
487
488
488
489
removeSsrLoadModule ?: 'warn'
489
490
}
@@ -702,6 +703,7 @@ export const configDefaults = Object.freeze({
702
703
removeServerModuleGraph : undefined ,
703
704
removeServerHot : undefined ,
704
705
removeServerTransformRequest : undefined ,
706
+ removeServerWarmupRequest : undefined ,
705
707
removeSsrLoadModule : undefined ,
706
708
} ,
707
709
legacy : {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const deprecationCode = {
10
10
removeServerModuleGraph : 'changes/per-environment-apis' ,
11
11
removeServerHot : 'changes/per-environment-apis' ,
12
12
removeServerTransformRequest : 'changes/per-environment-apis' ,
13
+ removeServerWarmupRequest : 'changes/per-environment-apis' ,
13
14
14
15
removeSsrLoadModule : 'changes/ssr-using-modulerunner' ,
15
16
} satisfies Record < keyof FutureOptions , string >
@@ -24,7 +25,9 @@ const deprecationMessages = {
24
25
'The `server.moduleGraph` is replaced with `this.environment.moduleGraph`.' ,
25
26
removeServerHot : 'The `server.hot` is replaced with `this.environment.hot`.' ,
26
27
removeServerTransformRequest :
27
- 'The `server.transformRequest` related APIs are replaced with methods in `this.environment`.' ,
28
+ 'The `server.transformRequest` is replaced with `this.environment.transformRequest`.' ,
29
+ removeServerWarmupRequest :
30
+ 'The `server.warmupRequest` is replaced with `this.environment.warmupRequest`.' ,
28
31
29
32
removeSsrLoadModule :
30
33
'The `server.ssrLoadModule` is replaced with Environment Runner.' ,
Original file line number Diff line number Diff line change @@ -592,20 +592,12 @@ export async function _createServer(
592
592
} )
593
593
} ,
594
594
transformRequest ( url , options ) {
595
- warnFutureDeprecation (
596
- config ,
597
- 'removeServerTransformRequest' ,
598
- 'server.transformRequest() is deprecated. Use environment.transformRequest() instead.' ,
599
- )
595
+ warnFutureDeprecation ( config , 'removeServerTransformRequest' )
600
596
const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
601
597
return environment . transformRequest ( url )
602
598
} ,
603
599
warmupRequest ( url , options ) {
604
- warnFutureDeprecation (
605
- config ,
606
- 'removeServerTransformRequest' ,
607
- 'server.warmupRequest() is deprecated. Use environment.warmupRequest() instead.' ,
608
- )
600
+ warnFutureDeprecation ( config , 'removeServerWarmupRequest' )
609
601
const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
610
602
return environment . warmupRequest ( url )
611
603
} ,
You can’t perform that action at this time.
0 commit comments