Skip to content

Vite Plugin

The @fastify/vue/plugin Vite plugin has the following options:

js
import { resolve } from 'node:path'

import viteVue from '@vitejs/plugin-vue'
import viteFastify from '@fastify/vite/plugin'
import viteFastifyVue from '@fastify/vue/plugin'

export default {
  root: resolve(import.meta.dirname, 'client'),
  plugins: [
    viteVue(),
    viteFastify(),
    viteFastifyVue({
      globPattern: '/views/**/*.vue',
      paramPattern: /\$(\w+)/,
    }),
  ],
}
import { resolve } from 'node:path'

import viteVue from '@vitejs/plugin-vue'
import viteFastify from '@fastify/vite/plugin'
import viteFastifyVue from '@fastify/vue/plugin'

export default {
  root: resolve(import.meta.dirname, 'client'),
  plugins: [
    viteVue(),
    viteFastify(),
    viteFastifyVue({
      globPattern: '/views/**/*.vue',
      paramPattern: /\$(\w+)/,
    }),
  ],
}

Read the Router Setup section to learn more about them.

Released under the MIT License.