Can't get runtime env variables anymore on Create-React-App 2.0 (original) (raw)

Hi,

I've recently been using this buildpack. I took note that runtime env variables wouldn't be possible without the "@mars/heroku-js-runtime-env" dependecy. So I installed it and wrote something like;

import runtimeEnv from '@mars/heroku-js-runtime-env'; const env = runtimeEnv(); export const serverUrl = env.REACT_APP_BACKEND_API || 'https://backend-staging.herokuapp.com/';

It worked great for a while, and now I seem to be getting an error;

Runtime env vars cannot be parsed. Content is {{REACT_APP_VARS_AS_JSON_______…

I believe this happened right after upgrading to create-react-app 2.0