storybookjs / react-inspector

🔍 Power of Browser DevTools inspectors right inside your React app
https://5d8cb665bc622e0020296079-dippbxxgcq.chromatic.com/
MIT License
761 stars 95 forks source link

fix: move `types` condition to the front #172

Closed Andarist closed 1 year ago

Andarist commented 1 year ago

I moved types condition to the front. package.json#exports are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.

Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their exports this way so the bug can be fixed in TypeScript.

⚠️ note that this only fixes one problem (🐛 Used fallback condition) but this package still won't be completely correct: arethetypeswrong.

netlify[bot] commented 1 year ago

Deploy Preview for sb-react-inspector ready!

Name Link
Latest commit 4c125c084382f57d8209964dd9bec410e45361b3
Latest deploy log https://app.netlify.com/sites/sb-react-inspector/deploys/644d58f295373300087becc1
Deploy Preview https://deploy-preview-172--sb-react-inspector.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Andarist commented 1 year ago

@ndelangen would you be able to cut a new release with this change? :)