mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-17 09:16:37 +08:00
14 lines
323 B
TypeScript
14 lines
323 B
TypeScript
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;
|
|
}
|