From aa0875ae9e75ea487b67925cde74dcf2a4dcb331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Fri, 13 Oct 2023 05:51:45 +0800 Subject: [PATCH] build debug --- index.js | 4 ++-- vite.config.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f7e9ae3..a04af1a 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ turnServer.start(() => { const app = express() const wsInstance = expressWs(app) -app.use(express.static('public')) +app.use(express.static('dist')) app.use(express.json()) app.use((req, res, next) => { if (req.method === 'CONNECT') { @@ -121,7 +121,7 @@ app.ws('/entanglement', (ws, req) => { // WEBHOOK 处理 GitHub 事件 app.post('/webhook', (req, res) => { console.log('WEBHOOK:' + new Date().toLocaleString()) - exec('git pull;npm i') + exec('git pull;npm i;npm run build') return res.json({ success: true }) }) diff --git a/vite.config.js b/vite.config.js index cc550ee..8a62dee 100644 --- a/vite.config.js +++ b/vite.config.js @@ -20,5 +20,8 @@ export default defineConfig({ }, plugins: [ WindiCSS(), - ] + ], + build: { + target: "esnext" + } })