Closed awinograd closed 1 year ago
Ah, that's interesting, will look into it
this might require removing the react-native field from package.json. i wonder if setting it to src
instead of src/index
would fix it.
removing react-native
should work as then metro will use the main
field.
I think that's probably the best option until full support for exports
lands in metro (https://github.com/facebook/metro/issues/670#issuecomment-1434510835)
Another idea would be adding dripsy/gradient/index.native.js
to export * from '../src/gradient'
yeah, not sure if there are downsides there. i guess everyone uses metro so could be fine
Hi, i am hitting this issue as well.
How could i make it work temporarily, while waiting for the fix ?
"react-native": "src/index.ts",
at package.json Line 7dripsy/gradient/index.native.js
to export * from '../src/gradient'
Hi, i am hitting this issue as well.
How could i make it work temporarily, while waiting for the fix ?
- i tried removing
"react-native": "src/index.ts",
at package.json Line 7- i tried adding
dripsy/gradient/index.native.js
toexport * from '../src/gradient'
I did a clean yarn install, and it works.
Kindly ignore my post
Can you guys try 4.3.2
and see if this is fixed?
Can you guys try
4.3.2
and see if this is fixed?
@nandorojo Upgraded from drippy 3 to 4.3.5 and I am hitting this issue as well.
👋 Thanks @nandorojo for an awesome lib!
I just upgraded from 3.x to 4.1 and after updating gradients to import from `dripsy/gradient' I get the following error when rendering a Gradient:
What i'm seeing, is that dripsy.gradient always exports from
build
https://github.com/nandorojo/dripsy/blob/e8272cd46261a34554c16fd370a536c5514e1312/packages/dripsy/gradient/index.js#L1
But in react-native, metro bundler will import from on
src
https://github.com/nandorojo/dripsy/blob/e8272cd46261a34554c16fd370a536c5514e1312/packages/dripsy/package.json#L7
This leads to two different copies of dripsy being loaded from
dripsy
anddripsy/gradient
so when I importDripsyProvider
it doesn't properly provide toGradient
.I'm a little surprised this hasn't come up yet in your usage of
Gradient
so I figure I must be "holding it wrong 🙃 . Am I missing something here? Thanks again!