Skip to content

Commit

Permalink
feat: adding additional API base url for VITE for forums
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson committed Sep 16, 2023
1 parent b38b671 commit ebb2a15
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/constructs/presentation/web-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class AmplifyMonoWebApp extends AbstractWebApp {
buildSpec: microAppBuildSpec('root'),
})
.addEnvironment('REACT_APP_API_BASE_URL', `https://${props.apiDomain}/v1`)
.addEnvironment('VITE_API_BASE_URL', `https://${props.apiDomain}/v1`)
.addEnvironment('VITE_GA_ID', MASTER_VITE_GA_ID)
.addEnvironment('VITE_MF_HOME_BASE_PATH', `https://${ROOT_DOMAIN}`);
this.branches.main = masterBranch;
Expand All @@ -91,6 +92,7 @@ export class AmplifyMonoWebApp extends AbstractWebApp {
'REACT_APP_API_BASE_URL',
`https://${props.apiDomain}/staging`,
)
.addEnvironment('VITE_API_BASE_URL', `https://${props.apiDomain}/staging`)
.addEnvironment('VITE_GA_ID', DEV_VITE_GA_ID)
.addEnvironment('VITE_MF_HOME_BASE_PATH', `https://${DEV_DOMAIN}`);
this.branches.dev = devBranch;
Expand All @@ -112,6 +114,7 @@ export class AmplifyMonoWebApp extends AbstractWebApp {
buildSpec: microAppBuildSpec(name),
environmentVariables: {
REACT_APP_API_BASE_URL: `https://${this.appProps.apiDomain}/v1`,
VITE_API_BASE_URL: `https://${this.appProps.apiDomain}/v1`,
REACT_APP_OAUTH_URL: `https://${this.appProps.authDomain}`,
NODE_OPTIONS: '--max-old-space-size=8192',
BIT_TOKEN: BIT_TOKEN,
Expand All @@ -138,6 +141,10 @@ export class AmplifyMonoWebApp extends AbstractWebApp {
'REACT_APP_API_BASE_URL',
`https://${this.appProps.apiDomain}/v1`,
)
.addEnvironment(
'VITE_API_BASE_URL',
`https://${this.appProps.apiDomain}/v1`,
)
.addEnvironment('VITE_GA_ID', MASTER_VITE_GA_ID)
.addEnvironment(
'VITE_PUBLIC_BASE_PATH',
Expand All @@ -156,6 +163,10 @@ export class AmplifyMonoWebApp extends AbstractWebApp {
'REACT_APP_API_BASE_URL',
`https://${this.appProps.apiDomain}/staging`,
)
.addEnvironment(
'VITE_API_BASE_URL',
`https://${this.appProps.apiDomain}/staging`,
)
.addEnvironment('VITE_GA_ID', DEV_VITE_GA_ID)
.addEnvironment('VITE_PUBLIC_BASE_PATH', `https://${appDomain}`);

Expand Down

0 comments on commit ebb2a15

Please sign in to comment.