<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kishor Shrestha</title>
    <description>The latest articles on DEV Community by Kishor Shrestha (@kishorshresthagithub).</description>
    <link>https://dev.to/kishorshresthagithub</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F402435%2Ff977b49f-c620-4262-90c5-18b60dafc542.png</url>
      <title>DEV Community: Kishor Shrestha</title>
      <link>https://dev.to/kishorshresthagithub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kishorshresthagithub"/>
    <language>en</language>
    <item>
      <title>How to do you preserve directory structure when creating a TS library?</title>
      <dc:creator>Kishor Shrestha</dc:creator>
      <pubDate>Mon, 28 Mar 2022 10:59:41 +0000</pubDate>
      <link>https://dev.to/kishorshresthagithub/how-to-do-you-preserve-directory-structure-when-creating-a-ts-library-1kgl</link>
      <guid>https://dev.to/kishorshresthagithub/how-to-do-you-preserve-directory-structure-when-creating-a-ts-library-1kgl</guid>
      <description>&lt;p&gt;I have created a React UI library to share components between different project in my organization. But, when importing the components I always have to&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import {Module} from "my-package"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;because when building using Rollup or Webpack, it only output a single bundle. (more if splitting is involved)&lt;/p&gt;

&lt;p&gt;This is not optimal. It works but it is not tree-shakeable. How do I preserve the directory structure when build the library or is there any other way to make my imports the following&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import Module from "my-package/Module"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thank you in advance.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>rollup</category>
      <category>webpack</category>
    </item>
  </channel>
</rss>
