Skip to content

Discussion: dirty hack for client-side #2

Closed

Description

@fatawesome

Hey, thanks for the library! I'm trying to setup federated SSR with Vue and having bad luck with the same place you implemented this obscure stuff. Just wanted to ask if you had any luck fixing it in a normal way?

The error I'm getting is about eager consumption (the same if use normal url instead of hack in your example).

Activity

  1. telenko commented on Jul 26, 2021

    @telenko
    Owner
  2. fatawesome commented on Jul 27, 2021

    @fatawesome
    Author

    Thanks! Btw, maybe you did some research on the problem? Unfortunately, from first several hours spent I did not get any result :D

  3. Kinbaum commented on Aug 5, 2021

    @Kinbaum

    Hey, I have a solution for that. You can do something like this:

    remotes: {
        remoteLib: isServer
            ? "remoteLib@http://localhost:3002/node/remoteEntry.js"
            : "remoteLib@http://localhost:3002/web/remoteEntry.js"
    }

    Then you can add a custom loader to test for _app.js so that you can attach the share scope at runtime.
    This gets around the globalThis problem.

    The only thing here is that the semver checks don't seem to work.
    The host and remote have to be on identical versions.

  4. fatawesome commented on Aug 17, 2021

    @fatawesome
    Author

    I will close this issue/discussion, as it seems to be solved :)

  5. added a commit that references this issue on Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions