4 ms·
The thing is, we don't need to learn Bazel either. We will just keep running the command "ng build", and internally the CLI will be using Bazel instead of Webpa
by vfc1 7y ago
The thing is, we don't need to learn Bazel either. We will just keep running the command "ng build", and internally the CLI will be using Bazel instead of Webpack, but that is transparent for us users.
We only see the CLI commands on our end, and the Angular CLI internally will use whatever build tool is best for the job at a given time, and will keep evolving over time.
It's such a relief that we don't need to learn build tools in the Angular ecosystem anymore and can focus on application development only.
- ericmcer 7y agoSure... I have never heard of Bazel, but it sounds very black boxish (JS goes in bundles come out!). That is basically the same thing webpack promised in comparison to gulp/grunt. A lower config JS build tool, which is always great until it isn’t. At a certain maturity you will need to dig into your projects build tool.
- tashoecraft 7y agoBazel is the open source version of googles interns build tooling. It’s not new, but using it outside of google is. It’s also not JavaScript specific, it’s completely language agnostic. You define the rules for building, and bazel will execute it. You can run your entire companies build system off of it.
- vfc1 7y ago> At a certain maturity you will need to dig into your projects build tool The command "ng build" takes in typescript and produces optimized lazy-loaded bundles, and there won't be the need to customize that, there aren't a thousand ways to produce bundles after all, there is one optimal way for a given ecosystem, and it does not make sense for each project to reinvent a build system that all it does is transpile, concatenate, minify, compress, etc. like every other project. Any additional build steps besides bundling are usually very simple can often be done either via npm scripts, or a simple shell script. Can you give examples of things for which you would absolutely have to customize the build system?
- ericmcer 7y agoCode splitting, live reload, things that come up like: we have some components that are using react native web, they will be imported into both web and native mobile applications, how do we prevent native sub dependencies of that component from being imported? What if you have multiple bundles but only want angular in one?
- vfc1 7y agoThe Angular CLI has support for both code splitting and live reload out of the box. ng build creates the main bundle plus the lazy-loaded bundles, and ng serve spins up a development server with live reload ready to go. The Angular CLI also supports multiple applications with shared components. You can build a web application that uses shared components, and a separate mobile application that uses the same shared components and has its own separate build. The React and Vue ecosystems are going in the same direction with their CLIs, but I don't think the Vue CLI or create-react-app are quite as powerful yet. Once they are, it will be the end of tooling fatigue, and no one will have to create their own custom build anymore (other than a shell script or so).
- deleted 7y ago[deleted]
- jbverschoor 7y agoUntil you want something that’s a liiitke bit different than what the dev’s usecase was