Reproduce and fix issue #19543
yarn
yarn build
yarn serve
open http://localhost:9000/hello
Open the devtools > network panel, and refresh the page. You should notice a 301 redirect to /hello/
.
yarn
yarn develop
open http://localhost:8000/hello
Open the devtools > network panel, and refresh the page. You should not notice any redirection.
yarn patch-package
rm -rf .cache public
yarn build
yarn serve
open http://localhost:9000/hello
Open the devtools > network panel, and refresh the page. You should not notice any redirection.
The fix also supports trailing slashes! All you have to do it to declare your routes with a trailing slash when using createPage
. Try it:
open http://localhost:9000/hello-slash/
- All dependencies have been upgraded to their latest version
- Tests have been performed on latest Chrome and Safari