import { Plugin } from 'vite'
export default function processHtml(title: string): Plugin {
return {
name: 'vite-plugin-html-process',
transformIndexHtml(html) {
return html.replace(
/<title>(.*?)<\/title>/,
`<title>${title}</title>`,
)
}