Configuration
Overview
Tuono can be configured using the tuono.config.ts
file,
which allows you to customize various aspects of the build process and development environment.
The config file is written in TypeScript,
so you can take advantage of type checking and auto-suggestions provided by the TuonoConfig
type,
which is exported from tuono/config
.
vite
Tuono leverages Vite, a modern and fast build tool and development server for web applications.
As a result, some Vite configuration properties can be set in the tuono.config.ts
file under the vite
property.
vite.alias
Useful for configuring custom source alias paths during imports
- Type:
Record<string, string>
Array<{ find: string | RegExp, replacement: string, customResolver?: ResolverFunction | ResolverObject }>
- Vite documentation: resolve.alias
vite.css
Config object for managing CSS behavior and integration with preprocessors (e.g., Sass, Less, etc.)
- Type:
CSSOptions
- Vite documentation: css
vite.optimizeDeps
Vite's dependency optimizer used only during dev
vite.plugins
Useful for extending vite's functionality
- Type:
Array<Plugin | Array<Plugin> | Promise<Plugin | Array<Plugin>>
- Vite documentation: plugins
server
The following options configure the server.
server.host
- Type:
string
- Default:
'localhost'
The hostname or IP address of the server.
It can be a domain name (e.g., "example.com"
) or an IP address (e.g., "127.0.0.1"
)
server.port
- Type:
number
- Default:
3000
The port number where the server will listen for incoming requests.
Edit page