Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/schema/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/src/config/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
10 changes: 10 additions & 0 deletions packages/schema/src/types/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ConfigSchema } from '../../schema/config'
import type { ResolvedConfig } from 'c12'
import { UserConfig } from 'vite'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could rename this import with vite in it and use import type

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

Expand All @@ -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
}