@@ -391,7 +391,7 @@ export interface UserConfig extends DefaultEnvironmentOptions {
391
391
/**
392
392
* Options to opt-in to future behavior
393
393
*/
394
- future ?: FutureOptions
394
+ future ?: FutureOptions | 'warn'
395
395
/**
396
396
* Legacy options
397
397
*
@@ -559,6 +559,7 @@ export interface ResolvedConfig
559
559
| 'dev'
560
560
| 'environments'
561
561
| 'experimental'
562
+ | 'future'
562
563
| 'server'
563
564
| 'preview'
564
565
> & {
@@ -617,6 +618,7 @@ export interface ResolvedConfig
617
618
worker : ResolvedWorkerOptions
618
619
appType : AppType
619
620
experimental : RequiredExceptFor < ExperimentalOptions , 'renderBuiltUrl' >
621
+ future : FutureOptions | undefined
620
622
environments : Record < string , ResolvedEnvironmentOptions >
621
623
/**
622
624
* The token to connect to the WebSocket server from browsers.
@@ -1534,7 +1536,20 @@ export async function resolveConfig(
1534
1536
configDefaults . experimental ,
1535
1537
config . experimental ?? { } ,
1536
1538
) ,
1537
- future : config . future ,
1539
+ future :
1540
+ config . future === 'warn'
1541
+ ? ( {
1542
+ removePluginHookHandleHotUpdate : 'warn' ,
1543
+ removePluginHookSsrArgument : 'warn' ,
1544
+ removeServerModuleGraph : 'warn' ,
1545
+ removeServerReloadModule : 'warn' ,
1546
+ removeServerPluginContainer : 'warn' ,
1547
+ removeServerHot : 'warn' ,
1548
+ removeServerTransformRequest : 'warn' ,
1549
+ removeServerWarmupRequest : 'warn' ,
1550
+ removeSsrLoadModule : 'warn' ,
1551
+ } satisfies Required < FutureOptions > )
1552
+ : config . future ,
1538
1553
1539
1554
ssr,
1540
1555
0 commit comments