Skip to content

Commit 972db93

Browse files
committed
migrate to Vite
Signed-off-by: swaroopar <[email protected]>
1 parent 88c4e0a commit 972db93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+7065
-16215
lines changed

Diff for: .env

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
REACT_APP_XPANSE_API_URL='http://localhost:8080'
2-
REACT_APP_ZITADEL_SCOPE='openid profile urn:zitadel:iam:org:projects:roles urn:zitadel:iam:user:metadata'
3-
REACT_APP_ZITADEL_REDIRECT_URI='/authentication/callback'
4-
REACT_APP_ZITADEL_SILENT_REDIRECT_URI='/authentication/silent-callback'
5-
REACT_APP_ZITADEL_AUTHORITY_URL='http://localhost:8081'
6-
REACT_APP_ZITADEL_CLIENT_ID=''
7-
REACT_APP_AUTH_USE_SERVICE_WORKER_ONLY=false
1+
VITE_APP_XPANSE_API_URL='http://localhost:8080'
2+
VITE_APP_ZITADEL_SCOPE='openid profile urn:zitadel:iam:org:projects:roles urn:zitadel:iam:user:metadata'
3+
VITE_APP_ZITADEL_REDIRECT_URI='/authentication/callback'
4+
VITE_APP_ZITADEL_SILENT_REDIRECT_URI='/authentication/silent-callback'
5+
VITE_APP_ZITADEL_AUTHORITY_URL='http://localhost:8081'
6+
VITE_APP_ZITADEL_CLIENT_ID=''
7+
VITE_APP_AUTH_USE_SERVICE_WORKER_ONLY=false

Diff for: .env.zitadel-testbed

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
REACT_APP_ZITADEL_AUTHORITY_URL='https://iam.xpanse.site'
2-
REACT_APP_ZITADEL_CLIENT_ID=221692308037369859@eclipse-xpanse
1+
VITE_APP_ZITADEL_AUTHORITY_URL='https://iam.xpanse.site'
2+
VITE_APP_ZITADEL_CLIENT_ID=221692308037369859@eclipse-xpanse

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ node_modules
1414
.history
1515
*.db
1616
build
17-
*.zip
17+
*.zip
18+
dist

Diff for: .prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
build
1+
dist
22
public/OidcServiceWorker.js

Diff for: docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM nginx:1.26.0-alpine
66
WORKDIR /usr/share/nginx/html
77
RUN apk add --no-cache bash envsubst
88
COPY docker/nginx-entrypoint.sh /
9-
COPY build/ /usr/share/nginx/html
9+
COPY dist/ /usr/share/nginx/html
1010
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
1111

1212
EXPOSE 3000

Diff for: docker/nginx-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# the script reads all available environment vars with names starting with REACT_APP_ and adds them to the
88
# inject.js file as a JS object.
99
WWW_DIR=/usr/share/nginx/html
10-
ENV_PREFIX=REACT_APP_
10+
ENV_PREFIX=VITE_APP_
1111
INJECT_FILE_PATH="${WWW_DIR}/inject.js"
1212
rm -f ${INJECT_FILE_PATH}
1313
echo "window.injectedEnv = {" >> "${INJECT_FILE_PATH}"

Diff for: public/index.html renamed to index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
<meta content="#000000" name="theme-color" />
1212
<meta content="Xpanse" name="description" />
1313
<title>xpanse</title>
14-
<script src="%PUBLIC_URL%/inject.js"></script>
14+
<script src="/inject.js"></script>
1515
</head>
16-
1716
<body>
1817
<noscript>You need to enable JavaScript to run this app.</noscript>
1918
<div id="root"></div>
19+
<script type="module" src="src/index.tsx"></script>
2020
</body>
2121
</html>

0 commit comments

Comments
 (0)