Skip to content

Commit

Permalink
chore: run dist with environment variables kyb-app
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapalakshmi committed Sep 8, 2024
1 parent 5506a77 commit 9a7d109
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/kyb-app/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export {};
declare global {
var env: { [key: string]: any };
}
1 change: 1 addition & 0 deletions apps/kyb-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>KYB - Collection Flow</title>
<script type="text/javascript" src="/config.js"></script>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 3 additions & 0 deletions apps/kyb-app/public/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
globalThis.env = {
VITE_API_URL: 'http://google.com',
};
5 changes: 5 additions & 0 deletions apps/kyb-app/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
</HelmetProvider>
</React.StrictMode>,
);

//@ts-ignore
globalThis.env = globalThis.env || {
API_URL: import.meta.env.VITE_API_URL,
};

0 comments on commit 9a7d109

Please sign in to comment.