mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
refactor: create more types to simplify TuonoConfig management (#699)
This commit is contained in:
committed by
GitHub
parent
b24466fb11
commit
0fa83fb1a2
@@ -1,5 +1,5 @@
|
||||
import type { TuonoConfig } from '../config'
|
||||
import type { TuonoConfig, TuonoConfigServer } from '../config'
|
||||
|
||||
export interface InternalTuonoConfig extends Omit<TuonoConfig, 'server'> {
|
||||
server: Required<NonNullable<TuonoConfig['server']>>
|
||||
server: TuonoConfigServer
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export type { TuonoConfig } from './types'
|
||||
export type { TuonoConfig, TuonoConfigServer } from './types'
|
||||
|
||||
@@ -5,15 +5,17 @@ import type {
|
||||
CSSOptions,
|
||||
} from 'vite'
|
||||
|
||||
export interface TuonoConfigServer {
|
||||
host: string
|
||||
origin: string | null
|
||||
port: number
|
||||
}
|
||||
|
||||
/**
|
||||
* @see http://tuono.dev/documentation/configuration
|
||||
*/
|
||||
export interface TuonoConfig {
|
||||
server?: {
|
||||
host?: string
|
||||
origin?: string | null
|
||||
port?: number
|
||||
}
|
||||
server?: Partial<TuonoConfigServer>
|
||||
vite?: {
|
||||
alias?: AliasOptions
|
||||
css?: CSSOptions
|
||||
|
||||
Reference in New Issue
Block a user