@@ -603,109 +603,108 @@ export interface InlineConfig extends UserConfig {
603603 forceOptimizeDeps ?: boolean
604604}
605605
606- export interface ResolvedConfig
607- extends Readonly <
608- Omit <
609- UserConfig ,
610- | 'plugins'
611- | 'css'
612- | 'json'
613- | 'assetsInclude'
614- | 'optimizeDeps'
615- | 'worker'
616- | 'build'
617- | 'dev'
618- | 'environments'
619- | 'experimental'
620- | 'future'
621- | 'server'
622- | 'preview'
623- > & {
624- configFile : string | undefined
625- configFileDependencies : string [ ]
626- inlineConfig : InlineConfig
627- root : string
628- base : string
629- /** @internal */
630- decodedBase : string
631- /** @internal */
632- rawBase : string
633- publicDir : string
634- cacheDir : string
635- command : 'build' | 'serve'
636- mode : string
637- isWorker : boolean
638- // in nested worker bundle to find the main config
639- /** @internal */
640- mainConfig : ResolvedConfig | null
641- /** @internal list of bundle entry id. used to detect recursive worker bundle. */
642- bundleChain : string [ ]
643- isProduction : boolean
644- envDir : string | false
645- env : Record < string , any >
646- resolve : Required < ResolveOptions > & {
647- alias : Alias [ ]
648- }
649- plugins : readonly Plugin [ ]
650- css : ResolvedCSSOptions
651- json : Required < JsonOptions >
652- /** @deprecated Use `oxc` option instead. */
653- esbuild : ESBuildOptions | false
654- oxc : OxcOptions | false
655- server : ResolvedServerOptions
656- dev : ResolvedDevEnvironmentOptions
657- /** @experimental */
658- builder : ResolvedBuilderOptions | undefined
659- build : ResolvedBuildOptions
660- preview : ResolvedPreviewOptions
661- ssr : ResolvedSSROptions
662- assetsInclude : ( file : string ) => boolean
663- rawAssetsInclude : ( string | RegExp ) [ ]
664- logger : Logger
665- /**
666- * Create an internal resolver to be used in special scenarios, e.g.
667- * optimizer & handling css `@imports`.
668- *
669- * This API is deprecated. It only works for the client and ssr
670- * environments. The `aliasOnly` option is also not being used anymore.
671- * Plugins should move to `createIdResolver(environment.config)` instead.
672- *
673- * @deprecated Use `createIdResolver` from `vite` instead.
674- */
675- createResolver : ( options ?: Partial < InternalResolveOptions > ) => ResolveFn
676- optimizeDeps : DepOptimizationOptions
677- /** @internal */
678- packageCache : PackageCache
679- worker : ResolvedWorkerOptions
680- appType : AppType
681- experimental : RequiredExceptFor < ExperimentalOptions , 'renderBuiltUrl' >
682- future : FutureOptions | undefined
683- environments : Record < string , ResolvedEnvironmentOptions >
684- /** @internal injected by legacy plugin */
685- isOutputOptionsForLegacyChunks ?(
686- outputOptions : NormalizedOutputOptions ,
687- ) : boolean
688- /**
689- * The token to connect to the WebSocket server from browsers.
690- *
691- * We recommend using `import.meta.hot` rather than connecting
692- * to the WebSocket server directly.
693- * If you have a usecase that requires connecting to the WebSocket
694- * server, please create an issue so that we can discuss.
695- *
696- * @deprecated
697- */
698- webSocketToken : string
699- /** @internal */
700- fsDenyGlob : AnymatchFn
701- /** @internal */
702- safeModulePaths : Set < string >
703- /** @internal */
704- nativePluginEnabledLevel : number
705- /** @internal */
706- [ SYMBOL_RESOLVED_CONFIG ] : true
707- } & PluginHookUtils
708- > { }
606+ export interface ResolvedConfig extends Readonly <
607+ Omit <
608+ UserConfig ,
609+ | 'plugins'
610+ | 'css'
611+ | 'json'
612+ | 'assetsInclude'
613+ | 'optimizeDeps'
614+ | 'worker'
615+ | 'build'
616+ | 'dev'
617+ | 'environments'
618+ | 'experimental'
619+ | 'future'
620+ | 'server'
621+ | 'preview'
622+ > & {
623+ configFile : string | undefined
624+ configFileDependencies : string [ ]
625+ inlineConfig : InlineConfig
626+ root : string
627+ base : string
628+ /** @internal */
629+ decodedBase : string
630+ /** @internal */
631+ rawBase : string
632+ publicDir : string
633+ cacheDir : string
634+ command : 'build' | 'serve'
635+ mode : string
636+ isWorker : boolean
637+ // in nested worker bundle to find the main config
638+ /** @internal */
639+ mainConfig : ResolvedConfig | null
640+ /** @internal list of bundle entry id. used to detect recursive worker bundle. */
641+ bundleChain : string [ ]
642+ isProduction : boolean
643+ envDir : string | false
644+ env : Record < string , any >
645+ resolve : Required < ResolveOptions > & {
646+ alias : Alias [ ]
647+ }
648+ plugins : readonly Plugin [ ]
649+ css : ResolvedCSSOptions
650+ json : Required < JsonOptions >
651+ /** @deprecated Use `oxc` option instead. */
652+ esbuild : ESBuildOptions | false
653+ oxc : OxcOptions | false
654+ server : ResolvedServerOptions
655+ dev : ResolvedDevEnvironmentOptions
656+ /** @experimental */
657+ builder : ResolvedBuilderOptions | undefined
658+ build : ResolvedBuildOptions
659+ preview : ResolvedPreviewOptions
660+ ssr : ResolvedSSROptions
661+ assetsInclude : ( file : string ) => boolean
662+ rawAssetsInclude : ( string | RegExp ) [ ]
663+ logger : Logger
664+ /**
665+ * Create an internal resolver to be used in special scenarios, e.g.
666+ * optimizer & handling css `@imports`.
667+ *
668+ * This API is deprecated. It only works for the client and ssr
669+ * environments. The `aliasOnly` option is also not being used anymore.
670+ * Plugins should move to `createIdResolver(environment.config)` instead.
671+ *
672+ * @deprecated Use `createIdResolver` from `vite` instead.
673+ */
674+ createResolver : ( options ?: Partial < InternalResolveOptions > ) => ResolveFn
675+ optimizeDeps : DepOptimizationOptions
676+ /** @internal */
677+ packageCache : PackageCache
678+ worker : ResolvedWorkerOptions
679+ appType : AppType
680+ experimental : RequiredExceptFor < ExperimentalOptions , 'renderBuiltUrl' >
681+ future : FutureOptions | undefined
682+ environments : Record < string , ResolvedEnvironmentOptions >
683+ /** @internal injected by legacy plugin */
684+ isOutputOptionsForLegacyChunks ?(
685+ outputOptions : NormalizedOutputOptions ,
686+ ) : boolean
687+ /**
688+ * The token to connect to the WebSocket server from browsers.
689+ *
690+ * We recommend using `import.meta.hot` rather than connecting
691+ * to the WebSocket server directly.
692+ * If you have a usecase that requires connecting to the WebSocket
693+ * server, please create an issue so that we can discuss.
694+ *
695+ * @deprecated
696+ */
697+ webSocketToken : string
698+ /** @internal */
699+ fsDenyGlob : AnymatchFn
700+ /** @internal */
701+ safeModulePaths : Set < string >
702+ /** @internal */
703+ nativePluginEnabledLevel : number
704+ /** @internal */
705+ [ SYMBOL_RESOLVED_CONFIG ] : true
706+ } & PluginHookUtils
707+ > { }
709708
710709// inferred ones are omitted
711710const configDefaults = Object . freeze ( {
@@ -769,7 +768,7 @@ const configDefaults = Object.freeze({
769768 importGlobRestoreExtension : false ,
770769 renderBuiltUrl : undefined ,
771770 hmrPartialAccept : false ,
772- enableNativePlugin : process . env . _VITE_TEST_JS_PLUGIN ? false : 'v1' ,
771+ enableNativePlugin : process . env . _VITE_TEST_JS_PLUGIN ? false : true ,
773772 } ,
774773 future : {
775774 removePluginHookHandleHotUpdate : undefined ,
@@ -2061,8 +2060,9 @@ function resolveNativePluginEnabledLevel(
20612060 case 'resolver' :
20622061 return 0
20632062 case 'v1' :
2064- case true :
20652063 return 1
2064+ case true :
2065+ return 2
20662066 case false :
20672067 return - 1
20682068 default :
0 commit comments