Skip to content

kingkongdevs/vite-plugin-posthtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite Plugin PostHTML

Vite plugin to run PostHTML. Currently only runs on served/built HTML files (index.html).

Installation

$ npm install vite-plugin-posthtml

In your vite.config.js file:

const { posthtmlPlugin } = require('vite-plugin-posthtml');

module.exports = {
  plugins: [
    posthtmlPlugin({
      /* config */
    }),
  ],
};

Config

The plugin's config is an object that takes three optional properties: plugins, options, and posthtml:

  • plugins - PostHTML plugins. You can mix synchronous and asynchronous plugins; the Vite plugin will always run in asynchronous mode.
  • options - PostHTML parser options. sync will always be overridden to false.
  • posthtml - If you'd like to override the PostHTML function that gets called (like to use a different version), you can pass it in here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published