Federated Module is undefined / ScriptExternalLoadError: Loading script failed. #3758
Replies: 1 comment
-
Use v2 not the original webpack one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the link to the reproducible repo for the issue (a). Looking forward for some interactive discussion to understand and fix this issue.
Issue :
a. Loaded remote module from app1 is undefined. I am unable to use any of the store methods app1 is exporting via remote module.
b. I have a similar issue with another app (not in the repo currently ) which exposes a react component called which when I import and use in the index.tsx of app2 I run into
I believe these two are inter-related and solving the first(8.a) will result in a fix for the other.
federated-module-issue
How to start ?
Clone the repo.
Ensure you have pnpm (8.14.1) and node(v20.11.1).
cd into app1 and run pnpm run-app1
cd into app2 and run pnpm run-app2
This will spin up both the apps.
App1 Serves the remote module on 5001 as configured:
But app1 finds the imported federated module as undefined. Which is confusing.
If I export a remote module which has a React components from *.tsx file I experience this issue:
What have I tried ? (and not worked)
Beta Was this translation helpful? Give feedback.
All reactions