WaspW
Wasp14mo ago
mgp25

Question about shared constants

We have the following code in shared constants:

const isDevEnv = process.env.NODE_ENV !== 'production';
const customerPortalTestUrl = 'TEST_URL'; 
const customerPortalProdUrl = 'PROD_URL';

export const STRIPE_CUSTOMER_PORTAL_LINK = isDevEnv
  ? customerPortalTestUrl
  : customerPortalProdUrl;

When testing locally, I am seeing the file constants is fetched as it is, being able to see test url as well. Is this the expected behaviour? Is there any better way to be able to set these while keeping the test url hidden during the deploy?
Was this page helpful?