Are there advantages of …

less than 1 minute read

Are there advantages of making libraries publishable (for incremental builds and caching purchases) if we don’t plan on publishing them?

Responses:

For incrementally building apps that use those libs that is.

Yes. nx build doesn’t cache individual libraries unless they’re publishable. (because webpack always builds from source) test and lint can cache any kind of library

Cool so if I made all of our libraries publishable then it would speed up our build time? Do you know how it works? Because when the Ng cli is looking at the angular code to build it follows the ts alias and would need to build that but if the ts alias points to a publishable lib it uses the prebuilt (if cached) libs instead?

Or is it that when webpack is building it will check if the source is built already and if it is uses that? (where the source would be built if there was a cache hit)

I’m a little fuzzy on the exact details. I heard that talked about it at the beginning of the office hours yesterday.

https://www.youtube.com/watch?v=Ral9ebYeAW0

Updated: