fix(storybook): adjusted STORYBOOK_ (#11171)

Corrected the `STORYBOOK_` RegExp to match documentation
https://storybook.js.org/docs/react/configure/environment-variable
This commit is contained in:
Mads Thines 2022-07-18 13:50:10 +02:00 committed by GitHub
parent cc6c2f9c59
commit edc9ce12a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ function getClientEnvironment(mode) {
// 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;
const STORYBOOK_PREFIX = /^STORYBOOK_/i;
const raw = Object.keys(process.env)
.filter((key) => NX_PREFIX.test(key) || STORYBOOK_PREFIX.test(key))