dillon1000/react

Commit

[babel] Fix default value for `environment` option

When an `environment` isn't explicitly provided by the user's config, we used to 
default this to `null` in `parsePluginOptions` which is called right at the 
start of the Babel plugin. These parsed options were then being passed to zod, 
which was expecting an object type, not null. 

Zod can reify a default config based on the schema, if an empty object is passed 
in. So by changing our default value to `{}` this should fix the compiler 
bailing out incorrectly on valid compiler options 

Test plan: tested this manually on the external repo by modifying node_modules
Browse files
Changed paths1 file
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/Entrypoint/Options.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…