facebook / stylex

StyleX is the styling system for ambitious user interfaces.
https://stylexjs.com
MIT License
8.22k stars 303 forks source link

Fix return value in esbuild plugin `onLoad` hook #506

Closed nedjulius closed 3 months ago

nedjulius commented 3 months ago

What changed / motivation ?

This PR fixes the return value of onLoad hook of the StyleX esbuild plugin (of the if branch when babel transform returns no code). Previously, it would return an object with property code, which resulted in undefined output of the plugin.

Linked PR/Issues

I did not create an issue for this since it's a very small fix.

Additional Context

Screenshots, Tests, Anything Else

Pre-flight checklist

nmn commented 3 months ago

Thanks! Will publish a release within a couple of days with this fix.