vite-plugin-vtpl
v1.0.0
Published
A vite plugin to transform your html using template syntax
Downloads
4
Readme
vite-plugin-vtpl
A vite plugin to transform your html using template syntax
Installation
npm i vite-plugin-vtpl
Usage
In your vite config
import { defineConfig, loadEnv } from 'vite'
import vtpl from 'vite-plugin-vtpl'
// https://vitejs.dev/config/
export default async ( { mode } ) => {
const env = loadEnv( mode, process.cwd() )
return defineConfig({
plugins: [
// ... your other plugins
vtpl(
// data
{
hello: 'world'
},
// options
{
openTag: '{{',
closeTag: '}}',
escape: true
}
)
],
})
}
license
MIT