Code Monkey home page Code Monkey logo

Comments (3)

ScriptedAlchemy avatar ScriptedAlchemy commented on June 11, 2024

Does the same functionality happen with standard webpack federation (v1)?

from module-federation-examples.

GuilleX7 avatar GuilleX7 commented on June 11, 2024

If you mean if reusing the same instance of a dependency is a common behavior of MF 1.0 and 1.5, yes it is.

The behavior of sharing dependencies but having multiple instances is implemented by my MF 1.5 plugin here. It's not part of MF 1.0 nor 1.5, but it does use MF 1.5 Plugin API to hook into the runtime.

Since MF 1.0 does not have a plugin API at all, it would need to be implemented as a Webpack plugin or directly implemented in the Module Federation 1.0 plugin. Ideally, this would be a feature implemented in MF 1.0 and 1.5, no need for additional plugins.

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on June 11, 2024

Yeah no i was more asking about if our new enhanced plugin had a issue that webpack did not.

Okay so generally, these instances are shared as you see.

You can patch it in and out of the webpack cache, which tbh may be the only way to do this type of thing (you should check what happens in production when module id is numeric)

I dont think there is a good option here to make "forgetful" modules, without possibly creating a new module type and module factory on the compiler end to do this. Like EagerIsolatedModule or something

from module-federation-examples.

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.