Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(schema): only disallow vite server port and host #7554

Merged
merged 2 commits into from Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/schema/src/types/config.ts
@@ -1,6 +1,6 @@
import type { KeepAliveProps, TransitionProps } from 'vue'
import { ConfigSchema } from '../../schema/config'
import type { UserConfig as ViteUserConfig } from 'vite'
import type { ServerOptions as ViteServerOptions, UserConfig as ViteUserConfig } from 'vite'
import type { Options as VuePluginOptions } from '@vitejs/plugin-vue'
import type { MetaObject } from './meta'
import type { Nuxt } from './nuxt'
Expand Down Expand Up @@ -53,19 +53,19 @@ export interface ViteConfig extends ViteUserConfig {
/**
* Use environment variables or top level `server` options to configure Nuxt server.
*/
server?: never
server?: Omit<ViteServerOptions, 'port' | 'host'>
}


// -- Runtime Config --

type RuntimeConfigNamespace = Record<string, any>

export interface PublicRuntimeConfig extends RuntimeConfigNamespace {}
export interface PublicRuntimeConfig extends RuntimeConfigNamespace { }

// TODO: remove before release of 3.0.0
/** @deprecated use RuntimeConfig interface */
export interface PrivateRuntimeConfig extends RuntimeConfigNamespace {}
export interface PrivateRuntimeConfig extends RuntimeConfigNamespace { }

export interface RuntimeConfig extends PrivateRuntimeConfig, RuntimeConfigNamespace {
public: PublicRuntimeConfig
Expand All @@ -88,4 +88,4 @@ export interface NuxtAppConfig {
keepalive: boolean | KeepAliveProps
}

export interface AppConfig {}
export interface AppConfig { }