-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
I'm running a SvelteKit (Svelte 5) project and trying to expose a navigation bar to my other microservices. Builds for both the host and remote are completing successfully.
Versions
- vite-plugin-federation: 1.4.0
- vite: 5.4.4
Reproduction
https://github.com/DavyK17/module-federation-svelte-5
Steps to reproduce
- Open two terminals and move into each folder:
cd remote(terminal 1) andcd host(terminal 2) - Install dependencies in both terminals with
npm install - Use
npm run build && npm run previewto build and serve theremotefirst, then thehost - Visit the
remoteat http://localhost:4173 and thehostat http://localhost:4174
What is Expected?
- The
remoteapp to display a header with the text "This is my remote header" - The
hostapp to display a header with the text "This is my host header"
What is actually happening?
The remote header is rendered correctly. The host header is not rendered and the following error is logged to the browser's console:
Uncaught (in promise) TypeError: Failed to resolve module specifier '${__federation_expose_./header}'
at y (remoteEntry.js:1:1092)
at ./header (remoteEntry.js:1:94)
at Module.v (remoteEntry.js:1:1182)
at 2.D2Y7IcEZ.js:1:1033
at async 2.D2Y7IcEZ.js:1:1269
Messoz, lecramr, Adrian-Grimm, firealex2 and cisasmendi
Metadata
Metadata
Assignees
Labels
No labels