I would like to add a JavaScript call to my html.html.twig
file, but there are two separate .js sources depending on which environment I'm on (production, and non-production). I believe Acquia Cloud (which we use) provides such variables, but they are for PHP.
I'm still relatively new to Drupal 8, so I might be missing something obvious with this. Is there a way to use Acquia Cloud's environment variables in a template file?
I forgot to mention that I tried accessing the environment variables from a few preprocess functions, for example themename_preprocess_html()
and themename_preprocess_page()
, but they are apparently not set at all.