Skip to content

vixt / core / NitroOptions

NitroOptions

Extends

  • Omit<NitroPluginConfig, "serverDir">

Properties

_cli?

optional _cli?: object

command?

optional command?: string

Inherited from

Omit._cli


_nitro?

optional _nitro?: Nitro

Internal

Use preinitialized Nitro instance for the plugin.

Inherited from

Omit._nitro


$development?

optional $development?: NitroConfig

Inherited from

Omit.$development


$env?

optional $env?: Record<string, NitroConfig>

Inherited from

Omit.$env


$meta?

optional $meta?: ConfigLayerMeta

Inherited from

Omit.$meta


$production?

optional $production?: NitroConfig

Inherited from

Omit.$production


$test?

optional $test?: NitroConfig

Inherited from

Omit.$test


alias?

optional alias?: Record<string, string>

Inherited from

Omit.alias


apiBaseURL?

optional apiBaseURL?: string

Inherited from

Omit.apiBaseURL


apiDir?

optional apiDir?: string

Inherited from

Omit.apiDir


awsAmplify?

optional awsAmplify?: AWSAmplifyOptions

Inherited from

Omit.awsAmplify


awsLambda?

optional awsLambda?: AwsLambdaOptions

Inherited from

Omit.awsLambda


azure?

optional azure?: AzureOptions

Inherited from

Omit.azure


baseURL?

optional baseURL?: string

Inherited from

Omit.baseURL


buildDir?

optional buildDir?: string

Inherited from

Omit.buildDir


builder?

optional builder?: "rollup" | "rolldown" | "vite"

Inherited from

Omit.builder


cloudflare?

optional cloudflare?: CloudflareOptions

Inherited from

Omit.cloudflare


commands?

optional commands?: object

deploy?

optional deploy?: string

preview?

optional preview?: string

Inherited from

Omit.commands


commonJS?

optional commonJS?: any

Inherited from

Omit.commonJS


compatibilityDate?

optional compatibilityDate?: CompatibilityDateSpec

Inherited from

Omit.compatibilityDate


compressPublicAssets?

optional compressPublicAssets?: boolean | CompressOptions

Inherited from

Omit.compressPublicAssets


database?

optional database?: DatabaseConnectionConfigs

Inherited from

Omit.database


debug?

optional debug?: boolean

Inherited from

Omit.debug


dev?

optional dev?: boolean

Inherited from

Omit.dev


devDatabase?

optional devDatabase?: DatabaseConnectionConfigs

Inherited from

Omit.devDatabase


devErrorHandler?

optional devErrorHandler?: NitroErrorHandler

Inherited from

Omit.devErrorHandler


devHandlers?

optional devHandlers?: NitroDevEventHandler[]

Inherited from

Omit.devHandlers


devProxy?

optional devProxy?: Record<string, string | ProxyServerOptions>

Inherited from

Omit.devProxy


devServer?

optional devServer?: object

hostname?

optional hostname?: string

port?

optional port?: number

runner?

optional runner?: RunnerName

watch?

optional watch?: string[]

Inherited from

Omit.devServer


devStorage?

optional devStorage?: StorageMounts

Inherited from

Omit.devStorage


enabled?

optional enabled?: boolean


entry?

optional entry?: string

Inherited from

Omit.entry


errorHandler?

optional errorHandler?: string | string[]

Inherited from

Omit.errorHandler


experimental?

optional experimental?: object & object

Type Declaration

asyncContext?

optional asyncContext?: boolean

Enable native async context support for useRequest()

database?

optional database?: boolean

Enable experimental Database support

See

https://nitro.build/guide/database

envExpansion?

optional envExpansion?: boolean

Allow env expansion in runtime config

See

https://github.com/nitrojs/nitro/pull/2043

openAPI?

optional openAPI?: boolean

Enable experimental OpenAPI support

See

https://nitro.build/docs/openapi

sourcemapMinify?

optional sourcemapMinify?: false

Disable Experimental Sourcemap Minification

tasks?

optional tasks?: boolean

Enable experimental Tasks support

See

https://nitro.build/guide/tasks

typescriptBundlerResolution?

optional typescriptBundlerResolution?: boolean

See https://github.com/microsoft/TypeScript/pull/51669

websocket?

optional websocket?: boolean

Enable WebSocket support

See

https://nitro.build/guide/websocket

Deprecated

use features.websocket instead.

Type Declaration

vite

vite: object

vite.assetsImport?

optional assetsImport?: boolean

Experimental

Enable ?assets import proposed by https://github.com/vitejs/vite/discussions/20913

Default
ts
true
vite.serverReload?

optional serverReload?: boolean

Invalidate server-only modules and optionally reload the browser when a server-only module is updated.

Default
ts
true
vite.services?

optional services?: Record<string, ServiceConfig>

Additional Vite environment services to register.

Inherited from

Omit.experimental


exportConditions?

optional exportConditions?: string[]

Inherited from

Omit.exportConditions


extends?

optional extends?: string | string[] | NitroPreset

Inherited from

Omit.extends


features?

optional features?: object

runtimeHooks?

optional runtimeHooks?: boolean

Enable runtime hooks for request and response.

By default this feature will be enabled if there is at least one nitro plugin.

websocket?

optional websocket?: boolean

Enable WebSocket support

Inherited from

Omit.features


firebase?

optional firebase?: FirebaseOptions

Inherited from

Omit.firebase


framework?

optional framework?: NitroFrameworkInfo

Inherited from

Omit.framework


future?

optional future?: object

nativeSWR?

optional nativeSWR?: boolean

Inherited from

Omit.future


handlers?

optional handlers?: NitroEventHandler[]

Inherited from

Omit.handlers


hooks?

optional hooks?: NestedHooks<NitroHooks>

Inherited from

Omit.hooks


ignore?

optional ignore?: string[]

Inherited from

Omit.ignore


iis?

optional iis?: object

mergeConfig?

optional mergeConfig?: boolean

overrideConfig?

optional overrideConfig?: boolean

Inherited from

Omit.iis


imports?

optional imports?: false | Partial<UnimportPluginOptions>

Inherited from

Omit.imports


inlineDynamicImports?

optional inlineDynamicImports?: boolean

Inherited from

Omit.inlineDynamicImports


logging?

optional logging?: object

buildSuccess?

optional buildSuccess?: boolean

compressedSizes?

optional compressedSizes?: boolean

Inherited from

Omit.logging


logLevel?

optional logLevel?: LogLevel

Inherited from

Omit.logLevel


manifest?

optional manifest?: object

deploymentId?

optional deploymentId?: string

Inherited from

Omit.manifest


minify?

optional minify?: boolean

Inherited from

Omit.minify


modules?

optional modules?: NitroModuleInput[]

Inherited from

Omit.modules


netlify?

optional netlify?: NetlifyOptions

Inherited from

Omit.netlify


node?

optional node?: boolean

Inherited from

Omit.node


noExternals?

optional noExternals?: boolean | (string | RegExp)[]

Inherited from

Omit.noExternals


noPublicDir?

optional noPublicDir?: boolean

Inherited from

Omit.noPublicDir


openAPI?

optional openAPI?: NitroOpenAPIConfig

OpenAPI configuration

See

https://nitro.build/docs/openapi

Inherited from

Omit.openAPI


output?

optional output?: Partial<{ dir: string; publicDir: string; serverDir: string; }>

Inherited from

Omit.output


oxc?

optional oxc?: OXCOptions

Inherited from

Omit.oxc


plugins?

optional plugins?: string[]

Inherited from

Omit.plugins


prerender?

optional prerender?: object

autoSubfolderIndex?

optional autoSubfolderIndex?: boolean

Prerender HTML routes within subfolders (/test would produce /test/index.html)

concurrency?

optional concurrency?: number

optional crawlLinks?: boolean

failOnError?

optional failOnError?: boolean

ignore?

optional ignore?: (string | RegExp | ((path) => boolean | null | undefined))[]

ignoreUnprefixedPublicAssets?

optional ignoreUnprefixedPublicAssets?: boolean

interval?

optional interval?: number

retry?

optional retry?: number

Amount of retries. Pass Infinity to retry indefinitely.

Default
ts
3

retryDelay?

optional retryDelay?: number

Delay between each retry in ms.

Default
ts
500

routes?

optional routes?: string[]

Inherited from

Omit.prerender


preset?

optional preset?: PresetNameInput

Inherited from

Omit.preset


publicAssets?

optional publicAssets?: PublicAssetDir[]

Inherited from

Omit.publicAssets


renderer?

optional renderer?: false | { handler?: string; static?: boolean; template?: string; }

Inherited from

Omit.renderer


replace?

optional replace?: Record<string, string | ((id) => string)>

Inherited from

Omit.replace


rolldownConfig?

optional rolldownConfig?: RolldownConfig

Inherited from

Omit.rolldownConfig


rollupConfig?

optional rollupConfig?: Partial<RollupConfig>

Inherited from

Omit.rollupConfig


rootDir?

optional rootDir?: string

Inherited from

Omit.rootDir


routeRules?

optional routeRules?: object

Index Signature

[path: string]: NitroRouteConfig

Inherited from

Omit.routeRules


routes?

optional routes?: Record<string, string | Omit<NitroEventHandler, "route" | "middleware">>

Inherited from

Omit.routes


routesDir?

optional routesDir?: string

Inherited from

Omit.routesDir


runtimeConfig?

optional runtimeConfig?: NitroRuntimeConfig

Inherited from

Omit.runtimeConfig


scanDirs?

optional scanDirs?: string[]

Inherited from

Omit.scanDirs


scheduledTasks?

optional scheduledTasks?: object

Index Signature

[cron: string]: string | string[]

Inherited from

Omit.scheduledTasks


serverAssets?

optional serverAssets?: ServerAssetDir[]

Inherited from

Omit.serverAssets


serverDir?

optional serverDir?: string & object | "./server" | "./"


serverEntry?

optional serverEntry?: string | false | { format?: EventHandlerFormat; handler: string; }

Inherited from

Omit.serverEntry


serveStatic?

optional serveStatic?: boolean | "node" | "deno" | "inline"

Inherited from

Omit.serveStatic


sourcemap?

optional sourcemap?: boolean

Inherited from

Omit.sourcemap


srcDir?

optional srcDir?: string

Deprecated

migrate to serverDir

Inherited from

Omit.srcDir


ssrRoutes?

optional ssrRoutes?: string[]

Inherited from

Omit.ssrRoutes


static?

optional static?: boolean

Inherited from

Omit.static


storage?

optional storage?: StorageMounts

Inherited from

Omit.storage


tasks?

optional tasks?: object

Index Signature

[name: string]: object

Inherited from

Omit.tasks


traceDeps?

optional traceDeps?: (string | RegExp)[]

Inherited from

Omit.traceDeps


traceOpts?

optional traceOpts?: Pick<ExternalsTraceOptions, "hooks" | "transform" | "nft" | "traceAlias" | "chmod">

Inherited from

Omit.traceOpts


tracingChannel?

optional tracingChannel?: boolean | TracingOptions

Inherited from

Omit.tracingChannel


typescript?

optional typescript?: object

generatedTypesDir?

optional generatedTypesDir?: string

Path of the generated types directory.

Default is node_modules/.nitro/types

generateRuntimeConfigTypes?

optional generateRuntimeConfigTypes?: boolean

generateTsConfig?

optional generateTsConfig?: boolean

strict?

optional strict?: boolean

tsConfig?

optional tsConfig?: Partial<TSConfig>

tsconfigPath?

optional tsconfigPath?: string

Path of the generated tsconfig.json relative to typescript.generatedTypesDir

Default is tsconfig.json (node_modules/.nitro/types/tsconfig.json)

Inherited from

Omit.typescript


unenv?

optional unenv?: Preset | Preset[]

Inherited from

Omit.unenv


vercel?

optional vercel?: VercelOptions

Inherited from

Omit.vercel


virtual?

optional virtual?: Record<string, string | (() => string | Promise<string>)>

Inherited from

Omit.virtual


wasm?

optional wasm?: false | UnwasmPluginOptions

See

https://github.com/unjs/unwasm

Inherited from

Omit.wasm


watchOptions?

optional watchOptions?: Partial<BasicOpts & object>

Inherited from

Omit.watchOptions


workspaceDir?

optional workspaceDir?: string

Inherited from

Omit.workspaceDir


zephyr?

optional zephyr?: ZephyrOptions

Inherited from

Omit.zephyr