GithubHelp home page GithubHelp logo

Comments (6)

sinedied avatar sinedied commented on June 19, 2024 1

No need to apologize, thanks to you I just discovered that they replaced --env by --configuration, among other breaking changes in angular-cli 6 that were not documented 😞

So I need to change the flag in ngx-script too, I'll push a fix ASAP

from scripts.

sinedied avatar sinedied commented on June 19, 2024 1

I just published version 3.0.0 to NPM, so you just have to npm i ngx-scripts@latest in your project 😉
Had to make it a major version bump since I changed the --env option to --configuration to match angular/cli new behavior.

from scripts.

sinedied avatar sinedied commented on June 19, 2024 1

@enhendrickson Angular CLI changed the way it works, the --configuration flag does not behave the same as the previous --environment flag: it now selects a whole build configuration defined in angular.json, not just the environment file.
And by default you have one for production, but not for dev, so you have 2 options here:

  • use the --dev flag of ngx-scripts that bascially set the --prod=false flag on Angular CLI, ie: ngx-scripts cordova build --dev --device --debug, but it will also disable minifications and code optiomization beside changing the environment

  • create a new dev configuration in angular.json that extends the existing production one but with a different enviromnent file, and then your command will work.

Yes, that's a lot of bother for something that just used to work 😞

from scripts.

enhendrickson avatar enhendrickson commented on June 19, 2024

Oh, okay... I wondered if that was it... thanks. When you push, would I need to pull from Github or will an npm update grab it?

from scripts.

enhendrickson avatar enhendrickson commented on June 19, 2024

This should work, right?
ngx-scripts cordova build --device --debug -- --configuration=dev

It doesn't. It still uses production.

from scripts.

enhendrickson avatar enhendrickson commented on June 19, 2024

@sinedied thanks for the awesome explanation!!

from scripts.

Related Issues (8)

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.