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