feat: 引入 Vite 前端工程化,解决浏览器缓存问题;AudioWorklet 独立打包带 hash

This commit is contained in:
2026-03-01 05:13:19 +08:00
parent c4ea49b0a3
commit 4b5903b6a1
10 changed files with 229 additions and 13 deletions

View File

@@ -17,7 +17,7 @@ import (
"github.com/imbytecat/voicepaste/internal/ws"
)
//go:embed all:web
//go:embed all:web/dist
var webFS embed.FS
var version = "dev"
@@ -102,7 +102,7 @@ func main() {
fmt.Println(" 按 Ctrl+C 停止服务")
fmt.Println()
// Create and start server
webContent, _ := fs.Sub(webFS, "web")
webContent, _ := fs.Sub(webFS, "web/dist")
var serverTLSCfg *crypto_tls.Config
if tlsResult != nil {
serverTLSCfg = tlsResult.Config