external-remotes-plugin icon indicating copy to clipboard operation
external-remotes-plugin copied to clipboard

How to use this plugin in rspack?

Open PIMBA opened this issue 1 year ago • 5 comments

PIMBA avatar Dec 22 '23 07:12 PIMBA

Were you able to solve this?

sherbakovdev avatar Feb 08 '24 17:02 sherbakovdev

We're getting this error:

ERROR in × TypeError: Cannot read properties of undefined (reading 'tap')
  │

image

steven-pribilinskiy avatar Feb 19 '24 19:02 steven-pribilinskiy

There is another plugin for dynamic remotes that works with rspack.

import { importRemote } from "@module-federation/utilities";

const ShellService = 
  React.lazy(() =>
    importRemote({
      scope: "shell",
      module: "./ShellService",
      remoteEntryFileName: "remoteEntry.js",
      url: () => axios.get("/remotes").then(data => data.shellRemoteURL), // e.g. http://localhost:3000
    })
  )
);

sherbakovdev avatar Feb 19 '24 20:02 sherbakovdev