mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
chore(schema): update vite config types (#6230)
This commit is contained in:
parent
6b20d9eff1
commit
e6f957ab32
@ -1,12 +1,13 @@
|
||||
import { ConfigSchema } from '../../schema/config'
|
||||
import type { ResolvedConfig } from 'c12'
|
||||
import { UserConfig } from 'vite'
|
||||
import { Options as VuePluginOptions } from '@vitejs/plugin-vue'
|
||||
import type { UserConfig as ViteUserConfig } from 'vite'
|
||||
import type { Options as VuePluginOptions } from '@vitejs/plugin-vue'
|
||||
|
||||
type DeepPartial<T> = T extends Function ? T : T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> } : T
|
||||
|
||||
/** User configuration in `nuxt.config` file */
|
||||
export interface NuxtConfig extends DeepPartial<Omit<ConfigSchema, 'vite'>> {
|
||||
// Avoid DeepPartial for vite config interface (#4772)
|
||||
vite?: ConfigSchema['vite']
|
||||
[key: string]: any
|
||||
}
|
||||
@ -28,7 +29,7 @@ export interface RuntimeConfig extends PrivateRuntimeConfig, RuntimeConfigNamesp
|
||||
public: PublicRuntimeConfig
|
||||
}
|
||||
|
||||
export interface ViteConfig extends UserConfig {
|
||||
export interface ViteConfig extends ViteUserConfig {
|
||||
/**
|
||||
* Options passed to @vitejs/plugin-vue
|
||||
* @see https://github.com/vitejs/vite/tree/main/packages/plugin-vue
|
||||
|
Loading…
Reference in New Issue
Block a user