Skip to content

Commit 2d69108

Browse files
committed
build: react-router failed
1 parent fb080b3 commit 2d69108

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG CONTEXT_PATH=""
1414
WORKDIR /usr/src/web
1515

1616
ENV VITE_APP_API_URL=${CONTEXT_PATH} \
17-
VITE_APP_BASE_PATH=${ROUTE_ROOT_PATH}
17+
VITE_APP_BASE_PATH=${ROUTE_ROOT_PATH}/ui
1818

1919
COPY --from=source /usr/src/web/package.json /usr/src/web/bun.lock /usr/src/web/source.config.ts /usr/src/web/
2020

web/vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ export default defineConfig({
1818
root: __dirname,
1919
}),
2020
],
21+
resolve:
22+
process.env.NODE_ENV === 'development'
23+
? {}
24+
: {
25+
alias: {
26+
'react-dom/server': 'react-dom/server.node',
27+
},
28+
},
2129
});

0 commit comments

Comments
 (0)