Code Monkey home page Code Monkey logo

Comments (6)

alexeagle avatar alexeagle commented on May 6, 2024

Right now we have a layering violation, and it's specifically for Ivy:
https://github.com/bazelbuild/rules_nodejs/blob/e72723558e3eaf998e36af85be3b6ae543efa3d6/internal/rollup/uglify.config.json#L9

this is the right general approach though - the optimizer should use constant folding with a global constant like this.

from angular-bazel-example.

mtsgrd avatar mtsgrd commented on May 6, 2024

This might be a silly question, but is it currently possible to specify any of the flags listed under --dev vs. --prod builds at https://github.com/angular/angular-cli/wiki/build? It's unclear to me to what extent or how the cli tool is used by the Bazel rules.

from angular-bazel-example.

mrmeku avatar mrmeku commented on May 6, 2024

Its currently not possible to use those flags. There are bazel specific alternatives like creating different ng_modules for different environments, but they are much more manual than what the CLI does with the environment flags

from angular-bazel-example.

mtsgrd avatar mtsgrd commented on May 6, 2024

Awesome, thanks for answering. If you don't mind, I'm trying to wrap my head around a potential build process. Unless I'm mistaken I don't have to worry about flags like --sourcemaps, because I get them in the output by default. But I'm curious about two things,

Does this use the closure compiler to produce minified output?

Would it be appropriate to use e.g. jsonnet for producing the config that I normally switch using the angular-cli --env flag?

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

This currently uses Rollup/Uglify for bundling and optimization, not Closure Compiler. We have some work-in-progress to hook up closure compiler with Bazel, but it's quite hard to use so we consider that an expert tool. Whereas the setup demonstrated in this repo is simple enough that we should be able to hide all the moving parts under the Angular CLI eventually.

Bazel builds always use AOT. In general, you should expect some configuration options to disappear while moving to Bazel, but at the same time you could compose different bazel rules together to customize the build.

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

Was fixed in a54ce41

from angular-bazel-example.

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.