Skip to content

vixt / core / DevServerOptions

DevServerOptions

Extends

  • Pick<ServerOptions, "port" | "host" | "cors">

Properties

cors?

optional cors?: boolean | CorsOptions

Configure CORS for the dev server. Uses https://github.com/expressjs/cors.

When enabling this option, we recommend setting a specific value rather than true to avoid exposing the source code to untrusted origins.

Set to true to allow all methods from any origin, or configure separately using an object.

Default

ts
false

Inherited from

Pick.cors


host?

optional host?: string | boolean

Specify which IP addresses the server should listen on. Set to 0.0.0.0 to listen on all addresses, including LAN and public addresses.

Inherited from

Pick.host


https?

optional https?: boolean | Partial<Options> & object

Whether to enable HTTPS by using @vitejs/plugin-basic-ssl.

Default

ts
false

port?

optional port?: number

Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on.

Inherited from

Pick.port


watch?

optional watch?: string[]

The watch property lets you define patterns that will restart the dev server when changed.