Code Monkey home page Code Monkey logo

Comments (5)

LunaSquee avatar LunaSquee commented on May 20, 2024 1

I intuitively assumed that this environment would be set if I used the --configuration option, but I guess not 😅 Please do consider this as an option. This package would be a good replacement for the built-in file replacements with minimal effort if this was the default behavior, in my opinion.

from dotenv-run.

chihab avatar chihab commented on May 20, 2024

Could you try this?

NG_APP_ENV=production ng build

It should pick .env.production and .env if present

from dotenv-run.

mhkolk avatar mhkolk commented on May 20, 2024

This worked though I had to use different syntax (Windows).

$env:NG_APP_ENV='production'

However I can't do this for example

"build:dev": "$env:NG_APP_ENV='k8s-dev'; ng build --configuration k8s-dev",

results in

The filename, directory name, or volume label syntax is incorrect

Why wouldn't be providing configuration with the --configuration option enough?

from dotenv-run.

chihab avatar chihab commented on May 20, 2024

maybe you'd want to use cross-env package to set the environment variable.

start: cross-env NG_APP_ENV=k8s-dev ng build --configuration k8s-dev

Your other suggestion to set NG_APP_ENV to the configuration option (when not set via NODE_ENV/NG_APP_ENV) is also interesting, thinking about it.

from dotenv-run.

chihab avatar chihab commented on May 20, 2024

Available in @ngx-env/builder 17.0.6

from dotenv-run.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.