The go router was rerouting /(.*) to /dist/$1: the problem is that
urls like /book/OL20639540W would route to /dist/book/OL20639540W,
which obviously doesn't exist.
This makes the router handle the SPA properly, following the example in
the mux documentation more or less exactly.
The go router was rerouting
/(.*)
to/dist/$1
: the problem is that urls like/book/OL20639540W
would route to/dist/book/OL20639540W
, which obviously doesn't exist.This makes the router handle the SPA properly, following the example in the mux documentation more or less exactly.