fix: screenshare rendering, voice panel layout, SW cache bust with git SHA
- VideoGrid: add screen share track display with proper sizing - participantToVoice: detect ScreenShare + ScreenShareAudio tracks - VoicePanel: flex layout, no scroll, tiles dynamically fill space - VoiceChannel: show screen/camera icons in participant list - vite.config: inject git SHA into SW CACHE_VERSION on build
This commit is contained in:
+19
-1
@@ -1,6 +1,8 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
let gitSha = process.env.GIT_SHA
|
||||
if (!gitSha) {
|
||||
@@ -13,7 +15,23 @@ if (!gitSha) {
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
// Inject git SHA into service worker cache version so every deploy busts the SW cache
|
||||
{
|
||||
name: 'inject-sw-version',
|
||||
writeBundle() {
|
||||
const swPath = path.resolve(__dirname, 'dist/sw.js');
|
||||
if (!fs.existsSync(swPath)) return;
|
||||
let content = fs.readFileSync(swPath, 'utf-8');
|
||||
content = content.replace(
|
||||
/const CACHE_VERSION = '[^']*'/,
|
||||
`const CACHE_VERSION = 'dumpster-${gitSha}'`
|
||||
);
|
||||
fs.writeFileSync(swPath, content);
|
||||
},
|
||||
},
|
||||
],
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(`v${gitSha}`),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user