How to distribute package for expo? (.web.js, .js configuration)

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): all
    I want to distribute a package for expo. This package was created while building my app in expo SDK36.

Like many expo dependencies, I use massively the .ios.s, .android.js and .web.js extensions.

While importing a source I have distributed on npm, resolver only import .js without any distinction.

As an example this package should work with expo:

But it does not, I have to manually import by suffixing in my sources with.web.

How can I configure expo or my distributed package in order to be able to import proper sources for each environment when sources are imported from node_modules ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.