FormidableLabs / victory-docs

Documentation for Victory: A collection of composable React components for building interactive data visualizations
http://formidable.com/open-source/victory
30 stars 64 forks source link

Figure out a solution for basePath / siteRoot in react-static 7 #642

Closed boygirl closed 4 years ago

boygirl commented 4 years ago

Figure out whether we can make basePath work correctly without specifying a siteRoot. Normally react-static will alter all your Link components and route history to use the path portions specified in siteRoot and basePath (i.e. "https://formidable.com" and "open-source/victory" for this project.) In react-static 5 it works to specify a basePath without a siteRoot, so that links get altered from /docs to /open-source/victory/docs, etc. In 7, the links are correct in the static html, but become incorrect on hydration. We can specify a siteRoot for the production build, which works, but isn't a great solution for our staging builds (here or on formidable.com staging)