fix: 修复生产模式静态文件路径 build->dist

This commit is contained in:
2026-03-20 13:47:00 +08:00
parent 524f0a6eb1
commit 0648a71560

View File

@@ -352,14 +352,14 @@ async function startServer() {
if (isDev) {
app.use(express.static(path.join(__dirname, '../dist')));
} else {
app.use(express.static(path.join(__dirname, '../build')));
app.use(express.static(path.join(__dirname, '../dist')));
}
app.use((req, res) => {
if (isDev) {
res.sendFile(path.join(__dirname, '../dist/index.html'));
} else {
res.sendFile(path.join(__dirname, '../build/index.html'));
res.sendFile(path.join(__dirname, '../dist/index.html'));
}
});