npm.io
2.0.1 • Published 5 months ago

@vituum/vite-plugin-twig

Licence
Version
2.0.1
Deps
2
Size
8 kB
Vulns
0
Weekly
0
Stars
22

npm package node compatility

️ ViteTwig

import twig from '@vituum/vite-plugin-twig'

export default {
    plugins: [
        twig()
    ],
    build: {
        rollupOptions: {
            input: ['index.twig.html']
        }
    }
}
  • Read the docs to learn more about the plugin options.
  • Use with Vituum to get multi-page support.

Basic usage

<!-- index.twig with index.twig.json -->
{{ title }}

or

<!-- index.json -->
{
  "template": "path/to/template.twig",
  "title": "Hello world"
}

Requirements

Keywords