New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(storybook): allow NX_* environment variables #10061
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
f15cfbc
to
a5bb9a3
Compare
a5bb9a3
to
23bae77
Compare
// Grab NODE_ENV and NX_* and STORYBOOK_* environment variables and prepare them to be | ||
// injected into the application via DefinePlugin in webpack configuration. | ||
const NX_PREFIX = /^NX_/i; | ||
const STORYBOOK_PREFIX = /^STORYBOOK__/i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a double underscore here.
This has caused all my STORYBOOK variables to suddenly disappear.
According to the docs it's a single underscore required.
https://storybook.js.org/docs/react/configure/environment-variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaysoo FYI :)
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
NX_*
environment variables are not available in Storybook.Storybook only allows
STORYBOOK_*
environment variables😕https://storybook.js.org/docs/react/configure/environment-variables
https://github.com/storybookjs/storybook/blob/bdf9e5ed854b8d34e737eee1a4a05add88265e92/lib/core-common/src/utils/envs.ts#L23-L27
Expected Behavior
NX_*
environment variables should be available.Related Issue(s)
Fixes #