Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/vituum/vite-plugin-nunjucks

⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML
https://github.com/vituum/vite-plugin-nunjucks

Last synced: 2 months ago
JSON representation

⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML

Lists

README

        

npm package
node compatility

# ⚡💡️ ViteNunjucks

```js
import nunjucks from '@vituum/vite-plugin-nunjucks'

export default {
plugins: [
nunjucks()
],
build: {
rollupOptions: {
input: ['index.njk.html']
}
}

}
```

* Read the [docs](https://vituum.dev/plugins/nunjucks.html) to learn more about the plugin options.
* Use with [Vituum](https://vituum.dev) to get multi-page support.

## Basic usage

or
```html

{{ title }}
```
or
```html

{
"template": "path/to/template.njk",
"title": "Hello world"
}
```

### Requirements

- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
- [Vite](https://vitejs.dev/)