Awesome
<a href="https://npmjs.com/package/@vituum/vite-plugin-twig"><img src="https://img.shields.io/npm/v/@vituum/vite-plugin-twig.svg" alt="npm package"></a> <a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/@vituum/vite-plugin-twig.svg" alt="node compatility"></a>
⚡️🌱 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"
}