You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue will be used to give updates on progress.
FAQ: how does this relate to Angular CLI? We will evaluate this toolchain with some early adopters first, if it goes well, we will evaluate whether to use it inside the CLI. So long as you haven't ejected from the CLI, such a change should be transparent to users.
Reacted by Oleksandr Tytskyi, Miloš Lapiš, Tor, JiaLiPassion, Alexander Trakhimenok, Abdel, Anbu Sampath, Dominique Müller, Yaroslav Admin, Mike Cahill and 88 more
Reacted by Carlos Galarza, Gleb Mikheev, Minko Gechev, Borja Ruiz Torres, Kevin Wiesmüller, Trotyl Yu, Neil Kalman, romain10009, Dave Raffensperger, Sumit Parakh and 3 more
Reacted by Benny Böhm, Trotyl Yu, Alexander Trakhimenok, Dominique Müller, Abdel, Mike Cahill, Lazar Ljubenović, Austin Shoecraft, Yosuke Kurami, Iago Alves and 37 more
Update: we are starting to accept enterprises in an Early Access Program, to try this out with support from our team.
If you are willing to tolerate risk, missing documentation, and commit to giving feedback, then we'd like to have you use this soon. Fill out https://goo.gl/forms/Tv8lMdH0N3D4yo8Q2 and I'll get in touch once we are ready to support your use cases.
Reacted by Eric Martinez, Matt Mackay, Elvis Begovic, Abdel, Trotyl Yu, Devon Germano, Gleb Mikheev, Kyle Cordes, Pankaj Parkar, Gunnar and 5 more
Reacted by Eric Martinez, Poul Kruijt, Abdel, Trotyl Yu, Gleb Mikheev, Carlos Galarza and Minko Gechev
Reacted by bmayen, Abdel, Trotyl Yu, Gleb Mikheev, Carlos Galarza and Minko Gechev
You can fill out the form, but we're interested in applications with
thousands of source files that suffer from slow builds under Angular CLI,
so we might not have capacity to take your use case.
@alexeagle could you define in time/seconds what you think is a slow build. The fact that the Angular platform degraded JIT, to a old fashioned build/compile/link time experience, even with small projects, I don't know what to expect. The reason I chose Javascript is because of JIT, wich I don't enjoy anymore in relation to Angular. AngularJS jit was F5 refresh build. Now ng build --prod is something to execute is low as possible, even with 'small ish?' projects.
I doubt that AnulgarJS jit was F5 refresh + build.
Either your browser loaded for some seconds or it took at least seconds to actually concat all the files.
AOT is the same, than any concat, just that it is more clever which will reduce the browser loading time.
@GoNode5 ... actually you can have dev time which is < 1 second = you just don't wait at all.
Another story is the whole building process to produce a completely new build for production or testing server (which is just internal version = the last step before production).
@schmitch You can doubt what you want, just look at a hello world ng serve size Angular project...
Compared that to my AngularJS project F5 (cache disabled) . I could add 600KB Angular Code but that wouldn't change much. The show load in image is a full project with about 30 screens, multi language. The thirdparty libs take's most of the load.
With runtime / ng build -prod, I'am very happy with the 'end' result. Fast, small en stable. But my developers experience is ruined. I had to buy a faster computer, create strategy's. In a larger project it's not only the ng serve rebuild time, but the runtime compile feels also slow.
For me the whole JIT experience is gone while developing.
Reacted by Rui Silva, Valentin Hăloiu, Stanimira Vlaeva, jeffrey n. carre, Sam Gammon, Alfonso Andrés López Molina, Kristoffer Lindström, Paul Draper and Geoffrey Testelin
Reacted by Marcus Schack and Alfonso Andrés López Molina
Well-rounded features for Angular, Android, Java, and C++
You can read more in the official announcement on the Google Open Source blog. Additionally, you can find a gentle introduction to Bazel and its experimental integration with the CLI in this community post by Ignacio Le Fluk "Angular + Bazel: Getting ready!".
📣 Enhanced JavaScript support
Talking about well-rounded features for Angular, Bazel can now run pretty much any module with an executable from npm! You can directly load the binary in your BUILD file and execute an automatically generated rule. For example, you can start an http server with the following short snippet:
Read more about the first-class JavaScript support in this post by @alexeagle.
Reacted by Ezekiel Warren, Marcus Schack, Kristoffer Lindström, Stefan Krause-Kjær, Klemen Oslaj, Vitaly Tkachenko, Will 保哥, Diego Bonura, Lukáš Kováč, Sergey and 11 more
Reacted by Stefan Krause-Kjær, Andrew Boyton, Sameer Singh, Karasu, Patrick Surrey, Nikola Rusakov, Gleb Mikheev and Ivan
@alexeagle you added bazel/stylus rule, but, it still unsupported by @angular/bazel builders
Could you please add stylus[, less] support to angular/cli
@afifalfiano - I propose that your core Angular libraries have not been compiled by ngcc to be consumable by the Angular ivy compiler. This is managed for you with the Angular CLI. I don't know much about how it is done if using Bazel directly. I suggest that you try running ngcc in your project root to compile all the node_modules packages.
@afifalfiano - I propose that your core Angular libraries have not been compiled by ngcc to be consumable by the Angular ivy compiler. This is managed for you with the Angular CLI. I don't know much about how it is done if using Bazel directly. I suggest that you try running ngcc in your project root to compile all the node_modules packages.
oke, absolutely i got soluction, when first i compile using ngcc and then i build this project using bazel run target, everything running well, but i have another problem, when i running ng serve, my project can't running cause ibazel cant find the file existing bazelisk
Update here: I published a blog post about Bazel support for Angular along with other frameworks, using an approach that relies less on Angular supporting any Bazel-specific bits. https://dev.to/bazel/angular-bazel-leaving-angular-labs-51ja
Reacted by Vlad Dumbrava, Rui Silva, Afif Alfiano and Panagiotis Kapros
I just successful run the Bazel on my Windows computer, it really amazing, just wonder any kind of "getting start with Bazel and Angular". Because I already read the BUILD.bazel but not really family with it
@hiepxanh I believe the best resource available is the example code here. If you're looking for a tutorial or guide to get started, I don't think there's a particular one that stands out as the best.
I would recommend the sample code because it is maintained along with the nodejs rules, so it should always be up to date. It also has some comments that do a little explaining of why certain things are included and what they do.
I started this project three years ago with two ambitious requirements:
Provide a scalable toolchain for big companies like Google with massive apps beyond the limits of existing OSS tooling
Angular team maintains only one toolchain
I think we have reached the first goal. Angular + Bazel has left Angular Labs and has some production usage. We have been maturing this and just reached 2.0 of rules_nodejs, where this support is maintained, demonstrated, and documented.
However the second requirement is much harder. Angular must maintain the CLI and keep all users updated to the latest. Switching this to Bazel required making it adoptable by the most novice users on small projects. This is the "Convergence" in the project title. It's very hard and was only ever staffed by one engineer (@gregmagolan who's awesome), plus me in part-time.
We didn't achieve Convergence, so Angular team will continue to maintain only the CLI (and the underlying build system called "Architect" aka CLI Builders). You can choose to layer Bazel on top of that underlying build system, continuing to use Architect for compatibility as documented here; that means you can still use Angular-team-supported tooling under Bazel (though with limited benefits). Big thanks to @alan-agius4 for volunteering to support this option.
What should you do?
If your project fits in Angular CLI, you should use it. Convergence isn't happening. Novice developers will never get the easy turnkey documentation and tools to switch. Bazel will never be the default, so we can close this issue.
Bazel has an on-ramp that requires understanding your build process in detail, and learning some new things like Bazel's configuration language. It's only suitable for projects where someone is willing to take the role of a build system engineer. I believe that extra-large-sized projects already have someone staffed to deal with deficiencies in the OSS toolchains, so in practice if you really need Bazel, you're probably a good fit to adopt it.
You can continue to follow our development in rules_nodejs, or join the #angular channel in http://slack.bazel.build
Thanks Angular community you are all awesome. Much ❤️
Reacted by Afif Alfiano, 雪狼, hiepxanh, Valentin Hăloiu, Minko Gechev, Jason Bedard, jeffrey n. carre, Zhongming Qu and Radoslav Kirilov
Reacted by hiepxanh
Reacted by hiepxanh and Radoslav Kirilov
Reacted by Preston Van Loon, Christian Rondeau, Zak Henry, Stefan Krause-Kjær, Maxime, Tegan Rauh, Rodrigo Alves, Toni Villena, hiepxanh and Alfonso Andrés López Molina
Reacted by Maksim Popov, Alan Agius, Fabian Wiles, 雪狼, Will 保哥, George Kalpakas, hiepxanh, Minko Gechev, Benjamin Kindle, Stefan Baumgartner and 3 more
Activity
zh99998 commentedon Sep 6, 2017
sounds like a big news.
will angular-cli moves to ABC and drop recommend of current webpack-based build system ?
abdel-ships-it commentedon Sep 6, 2017
Looks promising !
Is this going to kill the angular CLI? And will it eventually be a drop in replacement for codebases built with the angular CLI?
mlc-mlapis commentedon Sep 6, 2017
@realappie Angular CLI is a top layer so it should not be affected a lot but some changes probably could be.
alexeagle commentedon Sep 6, 2017
Updated the description above. It's possible this could be the build system in the CLI one day, but too early to be sure.
alexeagle commentedon Nov 21, 2017
Update: we are starting to accept enterprises in an Early Access Program, to try this out with support from our team.
If you are willing to tolerate risk, missing documentation, and commit to giving feedback, then we'd like to have you use this soon. Fill out https://goo.gl/forms/Tv8lMdH0N3D4yo8Q2 and I'll get in touch once we are ready to support your use cases.
crutchcorn commentedon Nov 21, 2017
Is there any way for individuals to sign up for this program rather than corporations?
alexeagle commentedon Nov 22, 2017
GoNode5 commentedon Nov 22, 2017
@alexeagle could you define in time/seconds what you think is a slow build. The fact that the Angular platform degraded JIT, to a old fashioned build/compile/link time experience, even with small projects, I don't know what to expect. The reason I chose Javascript is because of JIT, wich I don't enjoy anymore in relation to Angular. AngularJS jit was F5 refresh build. Now ng build --prod is something to execute is low as possible, even with 'small ish?' projects.
schmitch commentedon Nov 22, 2017
I doubt that AnulgarJS jit was F5 refresh + build.
Either your browser loaded for some seconds or it took at least seconds to actually concat all the files.
AOT is the same, than any concat, just that it is more clever which will reduce the browser loading time.
mlc-mlapis commentedon Nov 22, 2017
@GoNode5 ... actually you can have dev time which is < 1 second = you just don't wait at all.
Another story is the whole building process to produce a completely new build for production or testing server (which is just internal version = the last step before production).
alexeagle commentedon Nov 23, 2017
Our goal is <2s dev roundtrip (50%ile) for a large project, O(thousands) of source files.
GoNode5 commentedon Nov 23, 2017
@schmitch You can doubt what you want, just look at a hello world ng serve size Angular project...
Compared that to my AngularJS project F5 (cache disabled) . I could add 600KB Angular Code but that wouldn't change much. The show load in image is a full project with about 30 screens, multi language. The thirdparty libs take's most of the load.
With runtime / ng build -prod, I'am very happy with the 'end' result. Fast, small en stable. But my developers experience is ruined. I had to buy a faster computer, create strategy's. In a larger project it's not only the ng serve rebuild time, but the runtime compile feels also slow.
For me the whole JIT experience is gone while developing.
40 remaining items
marcus-sa commentedon Aug 14, 2019
Support for LESS would be great as well!
mgechev commentedon Aug 20, 2019
For August we have a few updates, but most actionable recently!
rollup_bundlecode splitting I825 no additional entry points bazel-contrib/rules_nodejs#839mgechev commentedon Oct 24, 2019
We have two major Bazel updates for you today!
🎉 Bazel 1.0 is out!
Few key features of the 1.0 release are:
You can read more in the official announcement on the Google Open Source blog. Additionally, you can find a gentle introduction to Bazel and its experimental integration with the CLI in this community post by Ignacio Le Fluk "Angular + Bazel: Getting ready!".
📣 Enhanced JavaScript support
Talking about well-rounded features for Angular, Bazel can now run pretty much any module with an executable from npm! You can directly load the binary in your BUILD file and execute an automatically generated rule. For example, you can start an http server with the following short snippet:
Read more about the first-class JavaScript support in this post by @alexeagle.
glebmachine commentedon Jan 13, 2020
@alexeagle you added bazel/stylus rule, but, it still unsupported by @angular/bazel builders
Could you please add stylus[, less] support to angular/cli
Looking forward to migrate to bazel toolchain : )
afifalfiano commentedon Apr 6, 2020
Hallo, i'm beginner using bazel on windows, do you know what this problem? and any solution?
petebacondarwin commentedon Apr 6, 2020
@afifalfiano - I propose that your core Angular libraries have not been compiled by ngcc to be consumable by the Angular ivy compiler. This is managed for you with the Angular CLI. I don't know much about how it is done if using Bazel directly. I suggest that you try running
ngccin your project root to compile all thenode_modulespackages.afifalfiano commentedon Apr 7, 2020
oke, absolutely i got soluction, when first i compile using ngcc and then i build this project using bazel run target, everything running well, but i have another problem, when i running ng serve, my project can't running cause ibazel cant find the file existing bazelisk
alexeagle commentedon Jun 15, 2020
Update here: I published a blog post about Bazel support for Angular along with other frameworks, using an approach that relies less on Angular supporting any Bazel-specific bits.
https://dev.to/bazel/angular-bazel-leaving-angular-labs-51ja
afifalfiano commentedon Jun 15, 2020
@alexeagle Hello Alex, how do I configure an angular environment with bazel? Before using bazel, I use file Replacement in angular.json? any idea?
hiepxanh commentedon Jul 26, 2020
I just successful run the Bazel on my Windows computer, it really amazing, just wonder any kind of "getting start with Bazel and Angular". Because I already read the
BUILD.bazelbut not really family with itliteralpie commentedon Jul 26, 2020
@hiepxanh I believe the best resource available is the example code here. If you're looking for a tutorial or guide to get started, I don't think there's a particular one that stands out as the best.
I would recommend the sample code because it is maintained along with the nodejs rules, so it should always be up to date. It also has some comments that do a little explaining of why certain things are included and what they do.
alexeagle commentedon Jul 26, 2020
🥇 Here's the final update 🥇
I started this project three years ago with two ambitious requirements:
I think we have reached the first goal. Angular + Bazel has left Angular Labs and has some production usage. We have been maturing this and just reached 2.0 of rules_nodejs, where this support is maintained, demonstrated, and documented.
However the second requirement is much harder. Angular must maintain the CLI and keep all users updated to the latest. Switching this to Bazel required making it adoptable by the most novice users on small projects. This is the "Convergence" in the project title. It's very hard and was only ever staffed by one engineer (@gregmagolan who's awesome), plus me in part-time.
We didn't achieve Convergence, so Angular team will continue to maintain only the CLI (and the underlying build system called "Architect" aka CLI Builders). You can choose to layer Bazel on top of that underlying build system, continuing to use Architect for compatibility as documented here; that means you can still use Angular-team-supported tooling under Bazel (though with limited benefits). Big thanks to @alan-agius4 for volunteering to support this option.
What should you do?
If your project fits in Angular CLI, you should use it. Convergence isn't happening. Novice developers will never get the easy turnkey documentation and tools to switch. Bazel will never be the default, so we can close this issue.
Bazel has an on-ramp that requires understanding your build process in detail, and learning some new things like Bazel's configuration language. It's only suitable for projects where someone is willing to take the role of a build system engineer. I believe that extra-large-sized projects already have someone staffed to deal with deficiencies in the OSS toolchains, so in practice if you really need Bazel, you're probably a good fit to adopt it.
You can continue to follow our development in rules_nodejs, or join the
#angularchannel in http://slack.bazel.buildThanks Angular community you are all awesome. Much ❤️
angular-automatic-lock-bot commentedon Aug 26, 2020
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.