chore(schema): update vite config types (#6230)

This commit is contained in:
pooya parsa 2022-07-29 14:34:55 +02:00 committed by GitHub
parent 6b20d9eff1
commit e6f957ab32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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