Closed nichoth closed 2 years ago
for posterity, I had to pass the --pushstate
option like this:
--pushstate [ --disallow \"\\.ed25519\" ]
This is part of package.json
{
"serve": "env $(cat .env | grep -v \"#\" | xargs) budo src/index.js:bundle.js --cors --pushstate [ --disallow \"\\.ed25519\" ] --dir=public --live --open -- -t envify -p esmify --debug",
}
it takes a disallow
option + a regex for the pattern not to treat as a literal file name
There is a bug where if I am visiting a route that contains a
.
, then the--pushstate
flag does now work in the budo command. So this should be serving theindex.html
file for any request that does not have a matching path (that's what the--pushstate
does)for example, clone https://github.com/planetary-social/viewer-frontend/blob/831d532602416c427668e084811a87ebdf0abbbe/package.json#L16 at the specified commit, then run
npm start
then visit:http://localhost:9966/@NoOZWqpkwfxcx9961k5huGe67ZhDTQC1UiHo71nvtNY=.ed25519
it will show a generic 404 message instead of rendering the app js