Skip to content

Commit 74a235f

Browse files
committed
fix dev server
1 parent 5dc4331 commit 74a235f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

website/src/components/templates/BaseTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
114114
<link
115115
href={
116116
import.meta.env.DEV
117-
? "/src/globals.css"
117+
? `${basePath.replace(/\/$/, "")}/src/globals.css`
118118
: `${basePath.replace(/\/$/, "")}/globals.css`
119119
}
120120
rel="stylesheet"

website/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ flattenedPages.forEach((page, pageIndex) => {
4747

4848
// Remove basePath from the route if it starts with basePath.
4949
let route = page.route;
50-
if (route.startsWith(basePath)) {
50+
if (import.meta.env.PROD && route.startsWith(basePath)) {
5151
route = route.slice(basePath.length - (basePath.endsWith("/") ? 1 : 0));
5252
}
5353
app.get(route, (c) => {

0 commit comments

Comments
 (0)