Skip to content

Commit 33eb823

Browse files
chore: run dist with environment variables kyb-app
1 parent 4df82a8 commit 33eb823

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

apps/kyb-app/global.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export {};
2+
declare global {
3+
var env: { [key: string]: any };
4+
}

apps/kyb-app/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>KYB - Collection Flow</title>
8+
<script type="text/javascript" src="/config.js"></script>
89
</head>
910
<body>
1011
<div id="root"></div>

apps/kyb-app/public/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
globalThis.env = {
2+
VITE_API_URL: 'http://google.com',
3+
};

apps/kyb-app/src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
3131
</HelmetProvider>
3232
</React.StrictMode>,
3333
);
34+
35+
//@ts-ignore
36+
globalThis.env = globalThis.env || {
37+
API_URL: import.meta.env.VITE_API_URL,
38+
};

0 commit comments

Comments
 (0)