this worked fine when I was running create-react-app locally, but when I tried to serve the build with serve -s ./build I got a weird error where it was serving the original index.html inside of the iframe instead of myfile.html
After some digging I realized that I needed to drop the -s option!
-s, --single Rewrite all not-found requests to index.html
Hey there, I'm just leaving this in case other people are running into the issue I was.
I was building a CRA app and trying to serve an html file in the /public dir like so
this worked fine when I was running create-react-app locally, but when I tried to serve the build with
serve -s ./build
I got a weird error where it was serving the original index.html inside of the iframe instead ofmyfile.html
After some digging I realized that I needed to drop the
-s
option!this worked just fine:
Cheers!