question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

environment variables

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request

Current behavior I cant find a way to set variables depending on builds

Expected/desired behavior A way to add something like environment variables for the development and production builds.

Minimal reproduction of the problem with instructions NA

What is the motivation / use case for changing the behavior? Set an API URL on localhost or some dev URL, and use another one for production, maybe the same way the angular-cli sets them up in the environments/ folder

Environment

  • Angular version: 4.3.0

  • Browser:

  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX
  • For Tooling issues:
  • Node version: 8.4.0
  • Platform: Windows
  • Others: NA

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
juanpmarincommented, Nov 8, 2017

@kaoz70 https://webpack.js.org/plugins/normal-module-replacement-plugin/ Using that plugin it can be done, having multiple environment files like angular-cli does

0reactions
fulls1z3commented, Oct 10, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment variable - Wikipedia
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of...
Read more >
An Introduction to Environment Variables and How to Use Them
An environment variable is a variable whose value is set outside the program, typically through functionality built into the operating ...
Read more >
How To Set Environment Variables - Twilio
Environment variables, as the name suggests, are variables in your system that describe your environment. The most well known environment ...
Read more >
Basic Features: Environment Variables - Next.js
Learn to add and access environment variables in your Next.js application.
Read more >
Environment variables - GitHub Docs
GitHub sets default environment variables for each GitHub Actions workflow run. You can also set custom environment variables in your workflow file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found