Giter Site home page Giter Site logo

Comments (22)

7rulnik avatar 7rulnik commented on May 22, 2024 2

BTW, the whole solution with the same disk looks weird. I believe that people mostly use docker containers. So we need the way to load remote chunks by HTTP on the server-side

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024 2

changes are, the next rewrite on streamed systems will resolve this. We are actively rewriting it.
I'm also working with Google, so we plan to introduce programmatic memory management into V8.

If anyone wants to collaborate on this, I'm willing to talk about it in more depth. But for the time being, i have alternative solutions that are part of proprietary tools. They take a very different approach but this is possible to achieve imo

from module-federation-examples.

7rulnik avatar 7rulnik commented on May 22, 2024 1

@benjoz could you rename it to something like that server doesn't re-fetch modules?

from module-federation-examples.

benjoz avatar benjoz commented on May 22, 2024 1

Done @7rulnik :)

from module-federation-examples.

7rulnik avatar 7rulnik commented on May 22, 2024

Yep, currently it's just proof of concept how we could connect 2 bundles. We don't have dynamic load of remoteEntry in website1.

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

Just wondering - is it "doesn't refetch", or "still use cached one"

from module-federation-examples.

7rulnik avatar 7rulnik commented on May 22, 2024

As I can remember it loads module only once, stores it in the cache, and doesn't re-fetch it.
But some new features for loading remotes were introduced in beta-17, but I didn't have time to check it. Maybe it will help.

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

I appear to have fixed this issue in streamed servers, however on local disks its not working. this is pretty much the need for HMR in production servers. Which is what was built into streamed tech.
@theKashey do you think your node cache clearing would work within this repo (server-side-rendering example) Since I'm not injecting phantom files during streams :P

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

pretty much either the webpack cache or node cache needs to be cleared i guess for the demo purpose. Wipe all caches upon each invocation

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

I also use target: async-node. Which might work better for SSR?

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

async-node is not supported by every "import->require" rewiring code splitting solution, which is every codesplitting library, universal included, except imported-components, which will basically eagerly import everything, making async mode a bit useless.


And yes - cache clearing is a must for any platform.

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

@7rulnik you want this sucker. https://youtu.be/kOuoSBTCzl4

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

what we could do on SSR is have the name of remoteEntry change in a random way so it would "hot reload" or redownload code

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

please just use uuid

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

@7rulnik you want this sucker. https://youtu.be/kOuoSBTCzl4

21:00 sounds like solution for "synchronous" i18n file loading, ie without waterfall of those "headers and footers", and load the loader first.

from module-federation-examples.

7rulnik avatar 7rulnik commented on May 22, 2024

@ScriptedAlchemy yep but it will lead to a memory leak

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

Just need hands willing to progress the research

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

Talk about programatic memory management? I am in :)

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

@theKashey I have a simpler SSR demo in pull request. Maybe we could work off that and try to come with a solution?

from module-federation-examples.

theKashey avatar theKashey commented on May 22, 2024

@ScriptedAlchemy - in which one?

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

I've got some ideas on this. With startup code a available we should be able to pass chunks back to the host.

For servers getting stuck. I've got a theory on how to solve this but short on time to build it out.

from module-federation-examples.

ScriptedAlchemy avatar ScriptedAlchemy commented on May 22, 2024

You can restart the process or make the host use it’s own remote as the real entry point. Then you can send a update command that pretty much re requires the remote and in the process purges module cache because we “restart” webpack runtime

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.