diff --git a/docs/dist-prod/open-source/spectacle b/docs/dist-prod/open-source/spectacle new file mode 120000 index 000000000..7724b9223 --- /dev/null +++ b/docs/dist-prod/open-source/spectacle @@ -0,0 +1 @@ +../../dist \ No newline at end of file diff --git a/docs/serve.json b/docs/serve.json index 8079168f2..10055379f 100644 --- a/docs/serve.json +++ b/docs/serve.json @@ -1,26 +1,4 @@ { - "public": "dist", - "trailingSlash": true, - "rewrites": [ - { - "source": "open-source/spectacle", - "destination": "/index.html" - }, - { - "source": "open-source/spectacle/:file", - "destination": "/:file" - }, - { - "source": "open-source/spectacle/:one/:file", - "destination": "/:one/:file" - }, - { - "source": "open-source/spectacle/:one/:two/:file", - "destination": "/:one/:two/:file" - }, - { - "source": "open-source/spectacle/:one/:two/:three/:file", - "destination": "/:one/:two/:three/:file" - } - ] + "public": "dist-prod", + "trailingSlash": true } diff --git a/docs/src/app.js b/docs/src/app.js index 0c91b6d96..ffd16ea70 100644 --- a/docs/src/app.js +++ b/docs/src/app.js @@ -51,13 +51,15 @@ ScrollToTop.propTypes = { const WrappedScrollToTop = withRouter(ScrollToTop); let history; +let basename; if (typeof window !== 'undefined') { const createBrowserHistory = require('history').createBrowserHistory; const { stage, landerBasePath } = require('../static-config-parts/constants'); + basename = `/${landerBasePath}`; history = stage === 'development' ? createBrowserHistory() - : createBrowserHistory({ basename: `/${landerBasePath}` }); + : createBrowserHistory({ basename }); } // eslint-disable-next-line react/no-multi-comp @@ -70,7 +72,7 @@ const App = () => ( history={history} > - +