forked from amundsen-io/amundsen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable UI config overrides post build (amundsen-io#1830)
* Apply App config with out rebuild the application Signed-off-by: rajasekhar reddy <[email protected]> * use config override if JS_CONFIG_OVERRIDE_ENABLED is set Signed-off-by: Aneesh Joseph <[email protected]> * Fixed lint errors Signed-off-by: rajasekhar reddy <[email protected]> * fix lint errors Signed-off-by: Aneesh Joseph <[email protected]> * Resolved lint errors Signed-off-by: rajasekhar reddy <[email protected]> Co-authored-by: Aneesh Joseph <[email protected]>
- Loading branch information
1 parent
0f684bb
commit 6d805e0
Showing
5 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
import { AppConfig } from './config-types'; | ||
import { AppConfig, AppConfigExternal } from './config-types'; | ||
import configDefault from './config-default'; | ||
import configCustom from './config-custom'; | ||
|
||
// This is not a shallow merge. Any defined members of customConfig will override configDefault. | ||
const appConfig: AppConfig = { ...configDefault, ...configCustom }; | ||
// This is not a shallow merge. In two steps we are overriding the application config | ||
// Step 1: Any defined members of customConfig will override configDefault. | ||
// Step 2: Any defined members of configExternal will override the configDefault and configCustom. | ||
|
||
const appConfig: AppConfig = { | ||
...configDefault, | ||
...configCustom, | ||
...(((globalThis as unknown) as AppConfigExternal)?.configExternal || {}), | ||
}; | ||
|
||
export default appConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters