Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Aug 13, 2023
1 parent c3074a3 commit f48e69f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/web/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# apps/web
BEATFORGE_API_URL=
BEATFORG_GITHUB_CALLBACK_URL=
BEATFORG_GITHUB_CALLBACK_URL=
10 changes: 5 additions & 5 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default defineConfig(({ mode }) => {
// if (!env.API_URL) env.API_URL = process.env.BEATFORGE_API_URL;
// if (!env.GITHUB_CALLBACK_URL) env.GITHUB_CALLBACK_URL = process.env.BEATFORGE_GITHUB_CALLBACK_URL;


let file_env = loadEnv(mode, process.cwd(), 'BEATFORGE');
const env = {
API_URL: process.env.BEATFORGE_API_URL ?? file_env.BEATFORGE_API_URL,
GITHUB_CALLBACK_URL: process.env.BEATFORGE_GITHUB_CALLBACK_URL ?? file_env.BEATFORGE_GITHUB_CALLBACK_URL
GITHUB_CALLBACK_URL:
process.env.BEATFORGE_GITHUB_CALLBACK_URL ?? file_env.BEATFORGE_GITHUB_CALLBACK_URL
};

// if (!env.API_URL) throw new Error('BEATFORGE_API_URL is not defined');
Expand All @@ -20,7 +20,7 @@ export default defineConfig(({ mode }) => {
plugins: [sveltekit()],
define: {
'import.meta.env.API_URL': JSON.stringify(env.API_URL),
'import.meta.env.GITHUB_CALLBACK_URL': JSON.stringify(env.GITHUB_CALLBACK_URL),
'import.meta.env.GITHUB_CALLBACK_URL': JSON.stringify(env.GITHUB_CALLBACK_URL)
}
}
});
};
});

0 comments on commit f48e69f

Please sign in to comment.