<?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: Vishesh Mangla</title>
    <description>The latest articles on DEV Community by Vishesh Mangla (@xtremegood).</description>
    <link>https://dev.to/xtremegood</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%2F450024%2Fafd5b403-9746-44cb-9693-ca6bcc081aa5.png</url>
      <title>DEV Community: Vishesh Mangla</title>
      <link>https://dev.to/xtremegood</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xtremegood"/>
    <language>en</language>
    <item>
      <title>Netilify deployment with react router</title>
      <dc:creator>Vishesh Mangla</dc:creator>
      <pubDate>Wed, 15 Sep 2021 09:41:48 +0000</pubDate>
      <link>https://dev.to/xtremegood/netilify-deployment-with-react-router-1oa2</link>
      <guid>https://dev.to/xtremegood/netilify-deployment-with-react-router-1oa2</guid>
      <description>&lt;p&gt;Recently tried to host a website on netlify whilst shifting from github-pages. Was a little bit of searching only after which it worked.&lt;/p&gt;

&lt;p&gt;Steps:&lt;br&gt;
1) Did the usual linking to github and getting a subdomain from &lt;br&gt;
&lt;code&gt;https://app.netlify.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2) In package.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "homepage": "https://&amp;lt;your_website_name&amp;gt;.netlify.app",
  "scripts":{
  "predeploy": "npm run build",
  "deploy": "netlify deploy"
  } 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Under &lt;code&gt;public&lt;/code&gt; folder add a file &lt;code&gt;_redirects&lt;/code&gt; with contents&lt;br&gt;
   &lt;code&gt;/*  /index.html  200&lt;/code&gt;.&lt;br&gt;
4) In root directory add a file named &lt;code&gt;netlify.toml&lt;/code&gt; with content as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[build]
  command = "npm run build"
  publish="/build"
  base = "" 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5) Then follow the steps here &lt;a href="https://www.netlify.com/blog/2016/07/22/deploy-react-apps-in-less-than-30-seconds/"&gt;https://www.netlify.com/blog/2016/07/22/deploy-react-apps-in-less-than-30-seconds/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>createreactapp</category>
    </item>
  </channel>
</rss>
