react-snap icon indicating copy to clipboard operation
react-snap copied to clipboard

Home page always being returned

Open bruno-silva5 opened this issue 2 years ago • 8 comments

Bug Report

Current Behavior I simply created a create-react-app (using React17) and installed react-snap and react-router-dom. Then I created some simple routes and pages (About, Contact, Home).

After properly configuring the react-snap. I created the static HTML files. But when I access the website with javascript disable, always the Home page is being returned.

For example. If I go to '/about', with Javascript disabled. The HTML of the main page is being returned, even though there is a HTML for the '/about' page.

Reproducible demo Link to GitHub repository or codesandbox with a demo of the bug behavior.

Expected behavior/code Expected to return the static HTML for the corresponding route

Additional context/Screenshots image

bruno-silva5 avatar Jul 20 '22 15:07 bruno-silva5

I'm experiencing this exact same behavior. Have you found a fix for it?

andrewtpoe avatar Aug 12 '22 18:08 andrewtpoe

@andrewtpoe Unfortunately not yet. Some months ago was working fine. I ask myself what could caused this problem.

bruno-silva5 avatar Aug 14 '22 22:08 bruno-silva5

I got the same issue using serve as the http server. But everything is ok with http-server (I mean using http-server instead of serve)

alexanchek avatar Nov 03 '22 14:11 alexanchek

Hi. Does anybody have some updates?

komxvl avatar Nov 22 '22 13:11 komxvl

Having same issue

Satsuger avatar Jan 24 '23 10:01 Satsuger

Indeed HTTP-server over npm serve package helps to fix this issue

Satsuger avatar Jan 24 '23 10:01 Satsuger

Same problem for me.

HakanSungur avatar Apr 12 '24 16:04 HakanSungur