chat-o-matic
chat-o-matic copied to clipboard
Removal of library in the React Chat App
The chat app itself works properly without library in the ModuleFederationPlugin section but when you try connecting it to the homepage it throws an error, I've realised if you add library to the homepage part it works well
That's really weird. As of 22 you don't need the library syntax with a remote that is defined using a URL, in fact it can sometimes cause the import to fail. Would you mind posting your version of the code to Github as well?
Sure, I've already posted it. Here's the link..Github https://github.com/ryann254/React-Messenger. I've also tried isolating the problem and now I'm pretty sure it's the library that's affecting it. I've also attached the error I get when I don't use the library.
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Thu, 20 Aug 2020 at 17:12, Jack Herrington [email protected] wrote:
That's really weird. As of 22 you don't need the library syntax with a remote that is defined using a URL, in fact it can sometimes cause the import to fail. Would you mind posting your version of the code to Github as well?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jherr/chat-o-matic/issues/3#issuecomment-677690945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZV2PJ2BZMU5T426HTWIGDSBUVMNANCNFSM4QFX7DKQ .
Gotcha, ok. If you want to take out the library, which you should do, then your home-page config should look like this:
name: "home",
filename: "remoteEntry.js",
remotes: {
chat: "chat@http://localhost:8080/remoteEntry.js",
},
exposes: {},
shared: require("./package.json").dependencies,
}),
And you should remove the script tag from index.html.
i dont know why but it shows cant resolve shards-react in client/src/Chat.jsx .
It works fine on my end..maybe try reinstalling all the dependencies.
On Mon, 16 Nov 2020 at 19:12, Hanbal Ahmed Codes [email protected] wrote:
i dont know why but it shows cant resolve shards-react in client/src/Chat.jsx .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jherr/chat-o-matic/issues/3#issuecomment-728162165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZV2PIUVIS2U2QUXF3ITD3SQFFQNANCNFSM4QFX7DKQ .
It works fine on my end..maybe try reinstalling all the dependencies. … On Mon, 16 Nov 2020 at 19:12, Hanbal Ahmed Codes @.***> wrote: i dont know why but it shows cant resolve shards-react in client/src/Chat.jsx . — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZV2PIUVIS2U2QUXF3ITD3SQFFQNANCNFSM4QFX7DKQ .
ok thanks