- 版本号:{version}
+ V{version}-
+ {buildTime}
+
{update ? new : null}
{update ?
diff --git a/vite.config.ts b/vite.config.ts
index c700f85..3d499eb 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'
import pxtovw from 'postcss-px-to-viewport-8-plugin'
import { resolve as resolvePath } from 'path'
import resolve from 'vite-plugin-resolve';
+import { createHtmlPlugin } from 'vite-plugin-html';
const loder_pxtovw = pxtovw({
viewportWidth: 1900,
viewportUnit: 'vw',
@@ -51,6 +52,20 @@ export default defineConfig({
base: './', // 这里更改打包相对绝对路径
plugins: [
react(),
+ createHtmlPlugin({
+ minify: false,
+ pages: [
+ {
+ template: 'index.html',
+ filename: 'index.html',
+ injectOptions: {
+ data: {
+ buildTime: +new Date()
+ }
+ }
+ }
+ ]
+ }),
resolve({
'agora-electron-sdk': `
const {