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.
  • Loading branch information
maciekstosio authored Dec 10, 2024
1 parent ecba861 commit aaa9cce
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 aaa9cce

Please sign in to comment.