Skip to content

vite-plugin/vite-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-html

html template for vite

NPM version NPM Downloads

English | 简体中文

Features

  • Support ejs template
  • Html entry alias
  • Inject js

Usage

import html from 'vite-html'
export default {
  plugins: [
    html(/* options */),
  ]
}

API

export interface Options {
  /** Value of script src */
  inject?: string
  /**
   * Path of [name].html
   * 
   * e.g.
   * - 'public/index.html'
   * - { 'index.html': 'public/index.ejs' }
   */
  template?: string | { [entryAlias: string]: string }
  data?: Record<string, any>
  /** Finally value of `req.url` */
  _url?: string
}

About

html template for vite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published