html.ts 500 B

1234567891011121314151617
  1. /**
  2. * Copyright (c) 2013-Now https://jeesite.com All rights reserved.
  3. * No deletion without permission, or be held responsible to law.
  4. * @author ThinkGem
  5. */
  6. import { type PluginOption } from 'vite';
  7. import { createHtmlPlugin } from 'vite-plugin-html';
  8. /**
  9. * Plugin to minimize and use ejs template syntax in index.html.
  10. * https://github.com/anncwb/vite-plugin-html
  11. */
  12. export function configHtmlPlugin(isBuild: boolean): PluginOption {
  13. return createHtmlPlugin({
  14. minify: isBuild,
  15. });
  16. }