Skip to content

Configure Vite

Environment: node
This setup function will only run on Node.js environment, you can have access to Node's API.

Slidev is powered by Vite under the hood. This means you can leverage Vite's great plugin system to customize your slides even further.

The vite.config.ts will be respected if you have one.

Slidev has the following plugins preconfigured:

Learn more about the pre-configurations here.

Configure Internal Plugins

Available since v0.21

To configure the built-in plugins listed above, create vite.config.ts with the following content. Please note Slidev has some preconfigure options for those plugins, this usage will override some of them, which could potentially cause the app to break. Please treat this as an advanced feature, make sure you know what you are doing before moving on.

import { defineConfig } from 'vite'

export default defineConfig({
  slidev: {
    vue: {
      /* vue options */
    markdown: {
      /* markdown-it options */
      markdownItSetup(md) {
        /* custom markdown-it plugins */
        md.use(/* ... */)
    /* options for other plugins */

See the type declarations for more options.

Released under the MIT License.