@vituum/vite-plugin-twig
v2.0.1
Published
Vite plugin for Twig, transforms twig templates into HTML
Maintainers
Readme
⚡️🌱 ViteTwig
import twig from '@vituum/vite-plugin-twig'
export default {
plugins: [
twig()
],
build: {
rollupOptions: {
input: ['index.twig.html']
}
}
}Basic usage
<!-- index.twig with index.twig.json -->
{{ title }}or
<!-- index.json -->
{
"template": "path/to/template.twig",
"title": "Hello world"
}