external-remotes-plugin
external-remotes-plugin copied to clipboard
How to use this plugin in rspack?
Were you able to solve this?
We're getting this error:
ERROR in × TypeError: Cannot read properties of undefined (reading 'tap')
│
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
})
)
);