Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
chore: update config so extensionUrls can be declared in .env file fo…
Browse files Browse the repository at this point in the history
…r local development (#237)

* update config so extensionUrls can be a string put into .env file

* add split to support multiple urls in .env file

* Update src/config.ts

Co-authored-by: rot1024 <aayhrot@gmail.com>

* revert type

Co-authored-by: rot1024 <aayhrot@gmail.com>
  • Loading branch information
KaWaite and rot1024 committed May 31, 2022
1 parent 4fd0eb3 commit 545b9ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export type Config = {
highSecurity?: RegExp;
};
ip?: string;
extensionURLs?: string[];
extensionUrls?: string[];
extensions?: Extensions;
};
declare global {
Expand Down Expand Up @@ -156,9 +156,8 @@ export default async function loadConfig() {
);
}

if (window.REEARTH_CONFIG?.extensionURLs) {
const urls = window.REEARTH_CONFIG.extensionURLs;
const extensions = getExtensionsFrom(urls);
if (window.REEARTH_CONFIG?.extensionUrls) {
const extensions = getExtensionsFrom(window.REEARTH_CONFIG.extensionUrls);
window.REEARTH_CONFIG.extensions = extensions;
}
}

0 comments on commit 545b9ec

Please sign in to comment.