Merge branch '宫格模式' of https://gitea.23544.com/marking/WGShare.Client.Electron into 视频监控
This commit is contained in:
commit
5db98e2b46
|
|
@ -0,0 +1,15 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const indexPath = path.resolve(__dirname, 'dist/index.html');
|
||||
let indexHtml = fs.readFileSync(indexPath, 'utf-8');
|
||||
const timestamp = new Date().getTime();
|
||||
|
||||
// 正则表达式匹配JS文件引用并添加时间戳
|
||||
indexHtml = indexHtml.replace(/<script type="module" crossorigin src="([^"]+)">/g, (match, p1) => {
|
||||
if (p1.endsWith('.js')) {
|
||||
return `<script type="module" crossorigin src="${p1}?t=${timestamp}"></script>`;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
fs.writeFileSync(indexPath, indexHtml);
|
||||
|
|
@ -7,6 +7,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self'">
|
||||
<meta name="build-time" content="<%- buildTime%>" id="build-time">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<!-- <meta http-equiv="Content-Security-Policy"
|
||||
content="script-src 'self' https://www.google-analytics.com; style-src 'self' https://animate.style"> -->
|
||||
<title></title>
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
"dev": "concurrently \"electron .\" \"cross-env BROWSER=none vite\"",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"build:dev": "vite build & electron-builder -w --config=./config/development.json",
|
||||
"build:prod": "vite build & electron-builder -w --config=./config/production.json",
|
||||
"build:xy": "vite build & electron-builder -w --config=./config/xy.json"
|
||||
"build:dev": "vite build & node build.js & electron-builder -w --config=./config/development.json",
|
||||
"build:prod": "vite build & node build.js & electron-builder -w --config=./config/production.json",
|
||||
"build:xy": "vite build & node build.js & electron-builder -w --config=./config/xy.json"
|
||||
},
|
||||
"agora_electron": {
|
||||
"platform": "win32",
|
||||
|
|
@ -56,4 +56,4 @@
|
|||
"vite-plugin-html": "^3.2.2",
|
||||
"vite-plugin-resolve": "^2.5.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue