vite-plugin-view
TypeScript icon, indicating that this package has built-in type declarations

6.0.1 • Public • Published

vite-plugin-view

npm package

NPM version NPM Downloads Node version

Dynamically render pages using custom template engines instead of the static .html entry file.


Documentation

For detailed usage instructions and API references, please visit the official documentation:

👉 View Full Documentation


Supported Template Engines

The plugin supports 59 template engines (sorted alphabetically):

  • arc-templates
  • atpl
  • bracket
  • dot
  • dust
  • eco
  • ejs
  • ect
  • haml
  • haml-coffee
  • hamlet
  • handlebars
  • hogan
  • htmling
  • jade
  • jazz
  • jqtpl
  • just
  • liquid
  • liquor
  • lodash
  • marko
  • mote
  • mustache
  • nunjucks
  • plates
  • pug
  • qejs
  • ractive
  • razor
  • react
  • slm
  • squirrelly
  • swig
  • teacup
  • templayed
  • toffee
  • twig
  • underscore
  • vash
  • velocityjs
  • walrus
  • whiskers

Installation

npm i -D vite-plugin-view <template-engine-name>

Replace <template-engine-name> with any engine from the list above (e.g., pug or ejs).


Configuration Example

Configure the plugin in vite.config.js:

import { defineConfig } from 'vite';
import { view } from 'vite-plugin-view';

export default defineConfig({
  plugins: [
    view({
      engine: 'pug',  // Set the template engine to use (e.g., 'pug', 'ejs', etc.)
    })
  ]
});

Contributing

We welcome contributions from the community! If you find a bug or want to suggest an improvement, feel free to open an issue or submit a pull request.

How to Contribute

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License.

/vite-plugin-view/

    Package Sidebar

    Install

    npm i vite-plugin-view

    Weekly Downloads

    4

    Version

    6.0.1

    License

    MIT

    Unpacked Size

    18.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • fengxinming