Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was 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

Description

@josh-m-sharpe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions