How to configure my react project for prioritize files ending in `.web.*` to be included in my bundle?

13 Views Asked by At

I am trying to use a react-native based library called react-native-reanimated. This library has some components that are also supported for the web, and they write 2 files, for example a measure component will have measure.tsx and measure.web.tsx file. When I use this library in a nextJS project, it bundles the correct file for web, which is measure.web.tsx, however with plasmo, it seems like it only bundles the files with extensions .ts or .js etc..., and skips the equivalent .web.* file.

How do I make parcel make the files that end in .web.* take precendence over .js|ts(x) files?


  • This one has code specific for react-native, and doesn't work on the web but the web file is not bundled File without .web extension

  • In the nextJS app you can see that it bundles the .web.js file

File with .web.js extension bundled

0

There are 0 best solutions below