File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
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 @@ -485,6 +485,7 @@ export interface FutureOptions {
485
485
removeServerModuleGraph ?: 'warn'
486
486
removeServerHot ?: 'warn'
487
487
removeServerTransformRequest ?: 'warn'
488
+ removeServerWarmupRequest ?: 'warn'
488
489
489
490
removeSsrLoadModule ?: 'warn'
490
491
}
@@ -703,6 +704,7 @@ export const configDefaults = Object.freeze({
703
704
removeServerModuleGraph : undefined ,
704
705
removeServerHot : undefined ,
705
706
removeServerTransformRequest : undefined ,
707
+ removeServerWarmupRequest : undefined ,
706
708
removeSsrLoadModule : undefined ,
707
709
} ,
708
710
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 >
@@ -25,6 +26,8 @@ const deprecationMessages = {
25
26
removeServerHot : 'The `server.hot` is replaced with `this.environment.hot`.' ,
26
27
removeServerTransformRequest :
27
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,15 +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 ) {
600
+ warnFutureDeprecation ( config , 'removeServerWarmupRequest' )
604
601
const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
605
602
return environment . warmupRequest ( url )
606
603
} ,
You can’t perform that action at this time.
0 commit comments