/vite-plugin-html-hooks

a hooks after vite built

Primary LanguageTypeScriptMIT LicenseMIT

Install

npm i -D vite-plugin-html-hooks

Add plugin to your vite.config.ts:

import htmlHooks from 'vite-plugin-html-hooks';

export default defineConfig(() => {
  return {
    plugins: [
      htmlHooks((html: string) => {
        return html.replace(/<title>.*<\/title>/g, `<title>Hello world</title>`);
      }),
    ],
  };
});