-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Describe the bug
Versions
Rspack -
"@module-federation/enhanced": "^0.15.0",
"@rspack/cli": "1.4.0-beta.1",
"@rspack/core": "1.4.0-beta.1",
"@module-federation/vite": "^1.5.0",
"vite": "^6.3.5"
Reproduction
https://github.com/yanirmanor/mf-vite-rm-vite-rspack-host
Steps to reproduce
When using only vite to vite everything works.
but when try to use vite as remote and rspack as host
then getting error
how to fix
Script error.
at handleError (http://localhost:8080/main.js:18765:64)
at http://localhost:8080/main.js:18789:13
ERROR
[ Federation Runtime ]: remoteEntryExports is undefined
{
"alias": "remote",
"name": "remote",
"entry": "http://localhost:5173/remoteEntry.js",
"externalType": "script",
"shareScope": "default",
"type": "global",
"entryGlobalName": "remote"
}
while loading "./remote-app" from webpack/container/reference/remote
Error: [ Federation Runtime ]: remoteEntryExports is undefined
{
"alias": "remote",
"name": "remote",
"entry": "http://localhost:5173/remoteEntry.js",
"externalType": "script",
"shareScope": "default",
"type": "global",
"entryGlobalName": "remote"
}
at error (http://localhost:8080/main.js:19260:11)
at assert (http://localhost:8080/main.js:19252:9)
at Module.getEntry (http://localhost:8080/main.js:20502:9)
at async Module.get (http://localhost:8080/main.js:20512:36)
at async RemoteHandler.loadRemote (http://localhost:8080/main.js:21854:37)
at async Promise.all (index 0)
Version
V1.5.0
Reproduction
https://github.com/yanirmanor/mf-vite-rm-vite-rspack-host
Relevant log output
Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.