Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

"Environments" section of repo results in "ReferenceError" in new v4 app #1531

Open
josh-m-sharpe opened this issue Jun 25, 2019 · 0 comments

Comments

@josh-m-sharpe
Copy link

Short description of the problem:

I've been attempting to include env variables from .env.dev using this section of the README. However I get the error ReferenceError: process is not defined when viewing my app in a browser.

Steps to reproduce:
I created a repo, so you can see the commits:

https://github.com/josh-m-sharpe/env_vars

Pretty straight forward:

  1. new v4 app
  2. create src/declarations.d.ts
  3. create .env.dev
  4. add console.log(process.env.MY_VAR) in src/app/home/home.page.ts
  5. ionic serve

Which @ionic/app-scripts version are you using?
4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant