Skip to content

Main Options

These are the main Vituum options that can be used. If you want to add vite options, do so inside the vite option - any option here overrides Vituum options.


  • Type: string[]
  • Default: ['./src/views/**/*.html', './src/emails/*.html', './src/styles/*.{css,pcss,scss,sass,less,styl,stylus}', './src/scripts/*.{js,ts,mjs}']

Project files for build synced with FastGlob that are included in Vite as build.rollupOptions.input


  • Type: string[]
  • Default: resolve(process.cwd(), 'public')

Specify the output directory for build


  • Type: string
  • Default: resolve(process.cwd(), 'src')

Project root directory (where source files are located). Can be an absolute path, or a path relative to the current working directory.

See Vite Project Root for more details.


  • Type: (Plugin | Plugin[] | Promise<Plugin | Plugin[]>)[]

Array of plugins to use. Falsy plugins are ignored and arrays of plugins are flattened. If a promise is returned, it would be resolved before running. See Vite Plugin API for more details on Vite plugins.


  • Type: string | (postcss.ProcessOptions & { plugins?: postcss.AcceptedPlugin[] })

Inline PostCSS config or a custom directory to search PostCSS config from (default is project root).

Extends the default PostCSS plugins already included in Vituum. If you want to use your own then use vite.css.postcss option.


  • Type: boolean
  • Default: false

Whenever to show detailed log in vituum build command


  • Type: string
  • Default: null || process.env.VITUUM_BUILD_MODE

Build mode to use, possible options are:

  • headless - to build all files, but without .html

  • Type: boolean | string

Automatically open the app in the browser on server start. See Vite for more details.


  • Type: boolean
  • Default: false

Whenever to use https, if you set true and you have cert file located in ~/.ssh directory with the name localhost-key.pem and localhost.pem then https works out of the box.

You can use mkcert to easily generate a valid local certificate file.


  • Type: string
  • Default: localhost

Certificate filename to use with server.https


  • Type: function
  • Default: null

You can add a custom filename filter to perform a full page refresh while you are running vite dev on any file you filter in the function


  • Type: string[]
  • Default: ['./src/styles/**', './src/scripts/**']

Paths where auto-imports should be resolved.


  • Type: RegExp
  • Default: /.(css|less|scss|pcss)$/

Types of files that should be resolved as styles


  • Type: RegExp
  • Default: /.(js|mjs|ts)$/

Types of files that should be resolved as scripts


  • Type: object
  • Default: {'+.css': 'src/styles', '+.js': 'src/scripts'}

Filename for file with imports and the paths where it should be processed. Path can be also array of paths.


  • Type: string
  • Default: views

Directory where your .html or template engine page files are located. Requests are auto-redirected in this directory.


  • Type: string[]
  • Default: ['emails']

Use this option if you want to access .html or template engine page files also in different directory relative to root that is outside the views directory.


  • Type: string
  • Default: null

Specify template engine name if you want to use .json files as pages for the template engines. Supported template engines are listed in templates.formats


  • Type: string[]
  • Default: ['json', 'latte', 'twig', 'liquid', 'njk', 'hbs', 'pug']

Supported template engines that will be resolved in middleware with dev server or in build.

Released under the MIT License.