Coder Social home page Coder Social logo

Comments (5)

jbroma avatar jbroma commented on July 4, 2024

Hi @Nazehs,

from your description I see that you are using Module Federation. In this case, since react-native-gesture-handler contains a native module and host-app needs to provide all packages with native modules. The library needs to declared as shared dependency in both webpack.config files (host and mini-app(s)). In your host app add the following to MF configuration:

new Repack.plugins.ModuleFederationPlugin({
        name: '<your_hostapp_name>',
        shared: {
            "react-native-gesture-handler": {
               singleton: true,
               eager: true
            }
        },
      }),

and in your mini-app it should be declared with eager set to false:

new Repack.plugins.ModuleFederationPlugin({
        name: '<your_hostapp_name>',
        shared: {
            "react-native-gesture-handler": {
               singleton: true,
               eager: false
            }
        },
      }),

from repack.

jbroma avatar jbroma commented on July 4, 2024

@Nazehs did that help with resolving your issue?

from repack.

Nazehs avatar Nazehs commented on July 4, 2024

@jbroma thank you but after trying on my own I did change the implementation that was using the package to use a different implementation. I would try it and see if that works.

from repack.

jbroma avatar jbroma commented on July 4, 2024

@Nazehs any chance you could check whether this resolves it? It would be good to close it with some sensible resolution for others to find in case they run into it as well. If not, I'll just close it as it is.

from repack.

Nazehs avatar Nazehs commented on July 4, 2024

@jbroma Thank you I have tried this again and it does work.

from repack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.