build: improve webpack config (#3561)

This commit is contained in:
Alex Yang
2023-08-03 16:05:46 -07:00
committed by GitHub
parent f2ac4c7eda
commit 0c16eb1189
21 changed files with 365 additions and 234 deletions
+4 -1
View File
@@ -6,7 +6,10 @@ const PORT = process.env.PORT || 8080;
app.use('/', express.static('dist'));
app.get('/*', (_, res) => {
app.get('/*', (req, res) => {
if (req.url.startsWith('/plugins')) {
res.sendFile(req.url, { root: 'dist' });
}
res.sendFile('index.html', { root: 'dist' });
});