vite-plugin-posthtml
v0.0.3
Published
A Vite plugin for PostHTML
Readme
Vite Plugin PostHTML
Vite plugin to run PostHTML. Currently only runs on served/built HTML files (index.html).
Installation
$ npm install vite-plugin-posthtmlIn 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.syncwill always be overridden tofalse.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.
