This commit is contained in:
oneao committed 2025-12-10 17:30:59 +08:00
1 parent 7dd7794fd1
commit 9b2db64cc6
10 files changed
+160 -5

No files matched your search

@@ -0,0 +1,13 @@
import type { Plugin } from 'vite';
export function setupHtmlPlugin(buildTime: string) {
const plugin: Plugin = {
name: 'html-plugin',
apply: 'build',
transformIndexHtml(html) {
return html.replace('<head>', `<head>\n <meta name="buildTime" content="${buildTime}">`);
}
};
return plugin;
}