DEV Community

Sharan
Sharan

Posted on

How to serve sitemap.xml file in the build folder after building react & webpack application

I have a sitemap.xml file in the public folder of my react application. I can view the sitemap during development in localhost, but when deployed to aws amplify it is not available. So I tried to build it locally and the sitemap was not served in build/dist folder. Can someone please help me with the webpack configuration to make the sitemap available in dist/build folder.

Before building

After running npm build

Top comments (1)

Collapse
 
shamariyan profile image
Sharan