mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45:53 +00:00
fix(schema): add typings for vite.vue
options (#6220)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
parent
8f65664ac0
commit
968087bcc5
@ -29,6 +29,7 @@ export default defineBuildConfig({
|
||||
'webpack-bundle-analyzer',
|
||||
'rollup-plugin-visualizer',
|
||||
'vite',
|
||||
'@vitejs/plugin-vue',
|
||||
'mini-css-extract-plugin',
|
||||
'terser-webpack-plugin',
|
||||
'css-minimizer-webpack-plugin',
|
||||
|
@ -8,7 +8,7 @@ export default {
|
||||
* See https://vitejs.dev/config for more information.
|
||||
* Please note that not all vite options are supported in Nuxt.
|
||||
*
|
||||
* @type {typeof import('vite').UserConfig}
|
||||
* @type {typeof import('../src/types/config').ViteConfig}
|
||||
* @version 3
|
||||
*/
|
||||
vite: {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { ConfigSchema } from '../../schema/config'
|
||||
import type { ResolvedConfig } from 'c12'
|
||||
import { UserConfig } from 'vite'
|
||||
import { 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
|
||||
|
||||
@ -25,3 +27,11 @@ export interface PrivateRuntimeConfig extends RuntimeConfigNamespace { }
|
||||
export interface RuntimeConfig extends PrivateRuntimeConfig, RuntimeConfigNamespace {
|
||||
public: PublicRuntimeConfig
|
||||
}
|
||||
|
||||
export interface ViteConfig extends UserConfig {
|
||||
/**
|
||||
* Options passed to @vitejs/plugin-vue
|
||||
* @see https://github.com/vitejs/vite/tree/main/packages/plugin-vue
|
||||
*/
|
||||
vue?: VuePluginOptions
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user