"ReferenceError: process is not defined" After Deploying Checkout UI Extension

Hi there!

In my Checkout.tsx, I have the following line:

const fetchUrl: string = ${process.env.APP_URL}/api/my_endpoint;

This works fine when previewing on my local/dev store by running
shopify app dev, but I get the following error on the deployed version:

ReferenceError: process is not defined

I’ve been trying to find a solution but haven’t had any luck. Could someone kindly offer some advice? Thank you in advance!