Skip to content

Commit

Permalink
Fix Playground Custom Application deployment previews (#3546)
Browse files Browse the repository at this point in the history
* fix(playground): use deployment preview url

* fix(playground): use deployment preview url

* refactor(playground): update custom app config
  • Loading branch information
CarlosCortizasCT authored Jun 14, 2024
1 parent 688b2c9 commit 24dd564
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion playground/custom-application-config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { PERMISSIONS, entryPointUriPath } from './src/constants';
const name = 'AppKit Playground Application';

const productionUrl = process.env.VERCEL_ENV !== 'production' && Boolean(process.env.VERCEL_URL) ?
`https://${process.env.VERCEL_URL}` :
process.env.APP_URL;

/**
* @type {import('@commercetools-frontend/application-config').ConfigOptionsForCustomApplication}
*/
Expand All @@ -19,7 +23,7 @@ const config = {
},
production: {
applicationId: '${env:APP_ID}',
url: '${env:APP_URL}',
url: productionUrl,
},
},
additionalEnv: {
Expand Down

0 comments on commit 24dd564

Please sign in to comment.