fix: use Express 5 compatible catch-all route syntax
Change SPA fallback from app.get('*') to app.get('/{*splat}')
as Express 5 uses path-to-regexp v8+ which requires named splat.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
db55d41eee
commit
1669af1e91
1 changed files with 2 additions and 1 deletions
|
|
@ -100,7 +100,8 @@ async function boot(): Promise<void> {
|
|||
}
|
||||
|
||||
// SPA Fallback (MUST be after plugin routes)
|
||||
app.get('*', (_req, res) => {
|
||||
// Express 5 uses path-to-regexp v8+ which requires named splat syntax
|
||||
app.get('/{*splat}', (_req, res) => {
|
||||
res.sendFile(path.join(import.meta.dirname ?? __dirname, '..', '..', 'web', 'dist', 'index.html'));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue