<?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: SwapnilH Patil</title>
    <description>The latest articles on DEV Community by SwapnilH Patil (@swapnilh_patil_9999).</description>
    <link>https://dev.to/swapnilh_patil_9999</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%2F3855809%2F94a97fbb-3493-4a8d-9e8b-f47035524d30.png</url>
      <title>DEV Community: SwapnilH Patil</title>
      <link>https://dev.to/swapnilh_patil_9999</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swapnilh_patil_9999"/>
    <language>en</language>
    <item>
      <title>How I accidentally shipped my source maps (and why ignore files matter)</title>
      <dc:creator>SwapnilH Patil</dc:creator>
      <pubDate>Thu, 02 Apr 2026 14:28:52 +0000</pubDate>
      <link>https://dev.to/swapnilh_patil_9999/how-i-accidentally-shipped-my-source-maps-and-why-ignore-files-matter-e16</link>
      <guid>https://dev.to/swapnilh_patil_9999/how-i-accidentally-shipped-my-source-maps-and-why-ignore-files-matter-e16</guid>
      <description>&lt;h2&gt;
  
  
  The Day I Shipped My Source Maps 😅
&lt;/h2&gt;

&lt;p&gt;So, it happened. I was using &lt;strong&gt;Claude&lt;/strong&gt; to help streamline an &lt;code&gt;npm&lt;/code&gt; package update. In the hustle of moving fast, the AI "helpfully" updated my package but included &lt;code&gt;.map&lt;/code&gt; files in the production build.&lt;/p&gt;

&lt;p&gt;It wasn’t a disaster, but it was a wake-up call. When we automate our workflows with AI, we tend to overlook the "boring" configuration files. But those files are actually our &lt;strong&gt;human-critical safety nets&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "Big Three" of Privacy &amp;amp; Performance
&lt;/h2&gt;

&lt;p&gt;If you want to keep your builds clean and your source code structure private, you need to master these three files:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;.gitignore&lt;/code&gt; 🛡️
&lt;/h3&gt;

&lt;p&gt;Your first filter. It tells Git which files or folders to strictly ignore so they are never tracked or uploaded to your repo. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What to include:&lt;/strong&gt; &lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;.env&lt;/code&gt; secrets, and local logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;.npmignore&lt;/code&gt; 📦
&lt;/h3&gt;

&lt;p&gt;Critical for library authors. If this file exists, &lt;code&gt;npm&lt;/code&gt; uses it instead of &lt;code&gt;.gitignore&lt;/code&gt; to determine what stays out of your published package.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Claude Lesson:&lt;/strong&gt; If you don't define this, &lt;code&gt;npm&lt;/code&gt; might default to your git rules, which often leads to accidentally publishing raw source or &lt;strong&gt;source maps&lt;/strong&gt; (&lt;code&gt;.map&lt;/code&gt; files) that you don't want in the final package.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;.vercelignore&lt;/code&gt; ⚡
&lt;/h3&gt;

&lt;p&gt;Essential for deployment efficiency. It tells Vercel exactly what to skip during the build process to speed up your CI/CD pipelines.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pro-Tip: The "Files" Array
&lt;/h2&gt;

&lt;p&gt;Instead of playing "Whack-a-Mole" with &lt;code&gt;.npmignore&lt;/code&gt;, use the &lt;code&gt;files&lt;/code&gt; property in your &lt;code&gt;package.json&lt;/code&gt;. This acts as a &lt;strong&gt;whitelist&lt;/strong&gt;, only allowing specific folders (like &lt;code&gt;dist&lt;/code&gt; or &lt;code&gt;build&lt;/code&gt;) to be published.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
json
{
  "name": "my-cool-package",
  "files": [
    "dist"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A fully-featured React loader overlay component</title>
      <dc:creator>SwapnilH Patil</dc:creator>
      <pubDate>Wed, 01 Apr 2026 14:18:02 +0000</pubDate>
      <link>https://dev.to/swapnilh_patil_9999/a-fully-featured-react-loader-overlay-component-44g9</link>
      <guid>https://dev.to/swapnilh_patil_9999/a-fully-featured-react-loader-overlay-component-44g9</guid>
      <description>&lt;p&gt;I got tired of copy-pasting loading overlay code between React projects — so I published it as an npm package.&lt;/p&gt;

&lt;p&gt;how many times have you written something like this?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// then somewhere... a semi-transparent div, a spinner, z-index battles,&lt;br&gt;
// position: fixed, you know the drill.&lt;/p&gt;

&lt;p&gt;yeah. same.&lt;/p&gt;

&lt;p&gt;so I built loader-overlay — a simple React component that wraps your content and handles all of that for you.&lt;/p&gt;

&lt;p&gt;getting started:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install loader-overlay&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then in your component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;LoaderOverlay&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;loader-overlay&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MyPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LoaderOverlay&lt;/span&gt; &lt;span class="nx"&gt;active&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;YourContent&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LoaderOverlay&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;that's genuinely it. no 15-step config, no provider wrapping your whole app, no style clashes.&lt;/p&gt;

&lt;p&gt;I built this because the existing options were either too heavy or too rigid. loader-overlay is intentionally small and flexible — use your own spinner, scope it to a section, or go full page. your call.&lt;/p&gt;

&lt;p&gt;try it out, open an issue, send a PR — all welcome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/loader-overlay" rel="noopener noreferrer"&gt;loader-overlay&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  react #javascript #npm #opensource #showdev #webdev
&lt;/h1&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>npm</category>
    </item>
  </channel>
</rss>
