<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dheeraj Upadhyay on Medium]]></title>
        <description><![CDATA[Stories by Dheeraj Upadhyay on Medium]]></description>
        <link>https://medium.com/@dheerajupadhyay?source=rss-532c2048b938------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gdvcZaq4j-nd-UgU.</url>
            <title>Stories by Dheeraj Upadhyay on Medium</title>
            <link>https://medium.com/@dheerajupadhyay?source=rss-532c2048b938------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:51:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dheerajupadhyay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to convert your angular workspace libraries into Nx buildable libraries (mono repo)]]></title>
            <link>https://medium.com/@dheerajupadhyay/how-to-convert-your-angular-workspace-libraries-into-nx-buildable-libraries-mono-repo-cb969fb66426?source=rss-532c2048b938------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb969fb66426</guid>
            <dc:creator><![CDATA[Dheeraj Upadhyay]]></dc:creator>
            <pubDate>Wed, 16 Feb 2022 18:18:47 GMT</pubDate>
            <atom:updated>2022-02-17T12:55:31.882Z</atom:updated>
            <content:encoded><![CDATA[<p>In order to use the <strong>incremental builds</strong> capability &amp; <strong>computation caching </strong>to speed up the CI build time of your large mono repo — you should have your libraries to be publishable or buildable. Nx cli provides a way with which you can create any new library as buildable or publishable</p><p>But what if you already have a set of libraries in your workspace and you want to convert existing libraries into buildable one. Don’t worry you are at a right place as I have decoded a way to convert existing one manually and there were also some common issues one might face so i will be discussing about all in detail.</p><p>As a first step, make sure you start with an independent and smallest library in your workspace which is not dependent on any other library.</p><p>Go to angular.json and search for configurations for your library name and add below configurations under “architect” section<br><strong>angular.json</strong> configs for your library :-</p><pre>&quot;build&quot;: {<br>&quot;builder&quot;: &quot;<a href="http://twitter.com/nrwl/angular">@nrwl/angular</a>:package&quot;,<br>&quot;options&quot;: {<br>&quot;tsConfig&quot;: &quot;libs/&lt;your-library&gt;/tsconfig.lib.json&quot;,<br>&quot;project&quot;: &quot;libs/&lt;your-library&gt;/ng-package.json&quot;<br>},<br>&quot;configurations&quot;: {<br>&quot;production&quot;: {<br>&quot;tsConfig&quot;: &quot;libs/&lt;your-library&gt;/tsconfig.lib.prod.json&quot;<br>    } <br>  } <br>}</pre><p>Make sure to add above references of new files like ng-package.json, package.json and tsconfig.lib.prod.json for each library that you are converting into buildable.</p><p>Build your library with the command :-</p><pre>nx build &lt;library-name&gt; --with-deps</pre><p>— with-deps is required if your buildable library is dependent on other libraries then those dependencies will be built first.</p><p><strong>commonly faced issue :-</strong></p><p>While building the nested library that is dependent on other libraries you may face the following issue for almost every imports in your source code.</p><pre>&#39;rootDir&#39; is expected to contain all source files.</pre><p>To resolve this you have to make sure the <strong>name</strong> inside <strong>package.json of the library must match with the — import path.</strong></p><p>For example :- For nested library inside lib1 make sure to use the following name :-</p><pre>“name”: “@myOrganization/libs/lib1”</pre><p>Already discussed &amp; validated the workaround with nrwl community over their slack channel :- <a href="https://nrwlcommunity.slack.com/archives/CMJ9RH6G6/p1644844364558029">https://nrwlcommunity.slack.com/archives/CMJ9RH6G6/p1644844364558029</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb969fb66426" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>