Skip to content

Commit

Permalink
fix(react-native): default template fails when envs are not set (#28931)
Browse files Browse the repository at this point in the history
## Current Behavior
When envs are not set metro fails in `.babelrc.js` on
`process.env.NX_TASK_TARGET_TARGET.includes('storybook')`

## Expected Behavior
When envs are not set don't fail on the if and just precede.

(cherry picked from commit aaa9cce)
  • Loading branch information
maciekstosio authored and FrozenPandaz committed Dec 10, 2024
1 parent bb58839 commit 58d822e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function (api) {

if (
process.env.NX_TASK_TARGET_TARGET === 'build' ||
process.env.NX_TASK_TARGET_TARGET.includes('storybook')
process.env.NX_TASK_TARGET_TARGET?.includes('storybook')
) {
return {
presets: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function (api) {

if (
process.env.NX_TASK_TARGET_TARGET === 'build' ||
process.env.NX_TASK_TARGET_TARGET.includes('storybook')
process.env.NX_TASK_TARGET_TARGET?.includes('storybook')
) {
return {
presets: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function (api) {

if (
process.env.NX_TASK_TARGET_TARGET === 'build' ||
process.env.NX_TASK_TARGET_TARGET.includes('storybook')
process.env.NX_TASK_TARGET_TARGET?.includes('storybook')
) {
return {
presets: [
Expand Down

0 comments on commit 58d822e

Please sign in to comment.