Vite Plugin
The @fastify/react/plugin
Vite plugin has the following options:
js
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import viteReact from '@vitejs/plugin-react'
import viteFastifyReact from '@fastify/react/plugin'
const path = fileURLToPath(import.meta.url)
export default {
root: join(dirname(path), 'client'),
plugins: [
viteReact(),
viteFastifyReact({
globPattern: '/views/**/*.vue',
paramPattern: /\$(\w+)/,
}),
],
}
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import viteReact from '@vitejs/plugin-react'
import viteFastifyReact from '@fastify/react/plugin'
const path = fileURLToPath(import.meta.url)
export default {
root: join(dirname(path), 'client'),
plugins: [
viteReact(),
viteFastifyReact({
globPattern: '/views/**/*.vue',
paramPattern: /\$(\w+)/,
}),
],
}
Read the Router Setup section to learn more about them.