vite-plugin-posthtml

0.0.3 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i vite-plugin-posthtml

Weekly Downloads

10

Version

0.0.3

License

MIT

Unpacked Size

5.18 kB

Total Files

7

Last publish

Collaborators

  • snugug