oblador / react-native-esbuild

Fast bundler and dev server for react-native using esbuild
MIT License
595 stars 11 forks source link

Fix assetRegistryPath default value #31

Closed Jinho1011 closed 1 year ago

Jinho1011 commented 1 year ago

This fixes issue #30 to support the latest version of react-native (0.72.1)

oblador commented 1 year ago

Hi, thanks for the PR! Would you mind fixing the example project by either updating it to 0.72 (preferred) or changing the config to point to the old registry path? Also, perhaps mention in the README on how to configure it for older versions?

Jinho1011 commented 1 year ago

Thank you for reviewing my PR and providing feedback. I have updated the example's react-native version to 0.72 and made the necessary changes accordingly. The example project is now aligned with the latest version.

oblador commented 1 year ago

Thanks! It seems not all steps of the upgrade was applied, see this guide for all of them: https://react-native-community.github.io/upgrade-helper/?from=0.71.6&to=0.72.1

Jinho1011 commented 1 year ago

I applied the changes for 0.72.1. Thanks for your guidance!

oblador commented 1 year ago

Sorry if this is a bit annoying, but it seems we also need to update the node version, you can do that in two places in this file: https://github.com/oblador/react-native-esbuild/blob/master/.github/workflows/tests.yml#L35

Jinho1011 commented 1 year ago

No problem at all 👍

oblador commented 1 year ago

Yay, tests are passing :-D

vovkasm commented 1 year ago

Oh my... it is not so easy configurable from react-native.config.js for older versions of RN, because some constants and defaults calculated in the getEsbuildConfig where default plugin instantiated 😢

oblador commented 1 year ago

@vovkasm Can't you keep using 0.5.0? Or is there something in 0.6.0 that you need?

vovkasm commented 1 year ago

@vovkasm Can't you keep using 0.5.0? Or is there something in 0.6.0 that you need?

Yes, of course I can keep using 0.5.0, but after version 0.6.0 will be version 0.7.0 etc... Actually I'm alredy fixed this with path-packege, it was easy than overriding plugin args in react-native.config.js :-)

oblador commented 1 year ago

Maybe by 0.7.0 you have upgraded RN 😁