Storybook Nginx configuration for production deployment #402
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the React component library's Storybook app Nginx configuration to handle routing according to these rules:
/
will be redirected to the B.C. Design System landing page on gov.bc.cahttps://<design-system-subdomain>.gov.bc.ca
will go to BCDS page/react-components/
will get served the Storybook app, which handles its own routing client-side after the first page loadhttps://<design-system-subdomain>.gov.bc.ca/react-components/
will go to Storybookhttps://<design-system-subdomain>.gov.bc.ca/react-components/?path=/docs/components-button-button--docs
goes to Storybook's Button documentation page/react-components
will be redirected to/react-components/
(trailing slash)Keeping this Nginx configuration where it is makes sense for now, but it might need a re-think if we start serving multiple apps from one subdomain at different paths. In that case, it might make more sense to move the Nginx configuration to somewhere else in this repo, outside of
packages/react-components
.