Skip to content

Commit b700a81

Browse files
refactor: migrate from Create React App to Vite, update dependencies and configurations
- Changed project structure to support Vite as the build tool. - Updated package.json to replace react-scripts with Vite and adjusted scripts accordingly. - Removed public/index.html as it is no longer needed with Vite. - Updated environment variable access from process.env to import.meta.env. - Modified TypeScript configuration to target ES2020 and updated module resolution. - Removed reportWebVitals and adjusted testing setup for Vitest. - Added Vite configuration file for server and build settings.
1 parent 4baf41f commit b700a81

17 files changed

Lines changed: 5514 additions & 21568 deletions

src/App/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
REACT_APP_API_BASE_URL=APP_API_BASE_URL
1+
VITE_API_BASE_URL=APP_API_BASE_URL

src/App/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# production
1212
/build
13+
/dist
1314

1415
# misc
1516
.DS_Store

src/App/WebApp.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ WORKDIR /home/node/app
33

44
COPY ./package*.json ./
55

6-
RUN npm ci --omit=dev
6+
RUN npm ci
77

88
COPY . .
99

1010
RUN npm run build
1111

1212
FROM nginx:alpine
1313

14-
COPY --from=build /home/node/app/build /usr/share/nginx/html
14+
COPY --from=build /home/node/app/dist /usr/share/nginx/html
1515

1616
COPY env.sh /docker-entrypoint.d/env.sh
1717
RUN chmod +x /docker-entrypoint.d/env.sh

src/App/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta name="description" content="Conversation Knowledge Mining" />
9+
<title>KM-Generic</title>
10+
</head>
11+
<body>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
13+
<div id="root"></div>
14+
<script type="module" src="/src/index.tsx"></script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)