Giter VIP home page Giter VIP logo

Comments (2)

camjackson avatar camjackson commented on May 22, 2024

Yes, this is an unsolved problem. The easiest thing to do is to not do lazy loading, and disable chunking, which I did with this rewiring: https://github.com/camjackson/react-app-rewire-micro-frontends.

In theory it should be possible to change the bundle loading code so that it's smart enough to download whatever needs to be downloaded. I had a brief attempt at it when creating the demo but ultimately decided it wasn't worth the effort for the sake of a simple demo.

It might be worth having a look at the upcoming Module Federation feature in webpack, which will add native support to webpack for dynamically importing modules from independently compiled webpack bundles.

from container.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

yep Module Federation was designed to do this, keeps SPA's standalone capable but also works like at runtime npm registry generated by your module federation and your own dependencies.

https://github.com/module-federation/module-federation-examples
https://github.com/sokra/slides/blob/master/content/ModuleFederationWebpack5.md

from container.

Related Issues (15)

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.