feat(router): add basename configuration for production env

Update router configuration to use '/react-template' as basename in production and '/' in development. Also update index.html title to reflect project name.
This commit is contained in:
2025-09-15 20:33:51 +08:00
parent b90b253785
commit 0ba8da3420
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -29,6 +29,8 @@ const router = createBrowserRouter([
},
],
},
])
], {
basename: process.env.NODE_ENV === 'production' ? '/react-template' : '/'
})
export default router