We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3109236 commit 3fc34b1Copy full SHA for 3fc34b1
main.cjs
@@ -44,7 +44,10 @@ async function setupServer(isDev) {
44
const app = express();
45
app.use(express.static(path.join(__dirname, 'dist')));
46
47
- app.get('*', (req, res) => {
+ // Fallback middleware: serve index.html for any request not handled by static files.
48
+ // Use a simple middleware instead of a route pattern to avoid path-to-regexp
49
+ // parsing differences between the dev environment and the packaged app.
50
+ app.use((req, res) => {
51
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
52
});
53
0 commit comments