Comments (6)
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.
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.
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.
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.
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.
Was fixed in a54ce41
from angular-bazel-example.
Related Issues (20)
- Remove need for rxjs_shims HOT 2
- breakage on latest master? HOT 2
- node option about rollup_bundle
- How to enable remote execution with language servers for `TypeScriptCompile` and `AngularTemplateCompile` actions HOT 3
- What is the current state of Converting an Angular CLI workspace? HOT 1
- Question: index.html and injected js HOT 3
- Question: Debugging on upgrade HOT 2
- question: Experimental Support for Ivy in Bazel? HOT 2
- cannot be named without a reference to '../../external/npm/node_modules/@angular/animations/animations' HOT 3
- Service Worker HOT 3
- Remove ngfactory deps HOT 4
- Multiple Node Projects Single WORKSPACE FILE HOT 8
- Already install @bazel/ibazel but still not running on window HOT 4
- Cannot find nodejs when running bazel run //src:devserver HOT 2
- Cannot import with module_name only with path HOT 1
- cannot import with path mappings from tsconfig.json HOT 3
- Bazel + Ivy (--define=compile=aot) fails with TS-966002 HOT 5
- Using Bazel in Application using Library HOT 1
- importHelpers breaks ng test HOT 1
- Bazel errors when building targets with rxjs deps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-bazel-example.