3 ms·
> 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 bundle
by 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]