Hello,
I am trying to import a react VITE remote into an angular host built with NX.
When I load the host I have a blank page with the following error in the console:
Uncaught SyntaxError: Cannot use 'import.meta' outside a module (at styles.js:8124:29)
Uncaught TypeError: Failed to resolve module specifier "reactNewViteRemote@http://localhost:4173/assets/remoteReactViteManifest.json". Relative references must start with either "/", "./", or "../".
Describe the bug
Hello, I am trying to import a react VITE remote into an angular host built with NX.
When I load the host I have a blank page with the following error in the console:
My react remote is built with VITE: repo: https://github.com/lfaure75/reactViteRemote
For my host, I created a angular component in order to wrap my react remote and update the routes: repo: https://github.com/lfaure75/nx-angular-workspace
my wrapped component:
the routes:
module federation:
I have the package "@module-federation/enhanced": "0.6.11"
Many thanks in advance for your help
Reproduction
https://github.com/lfaure75/nx-angular-workspace
Used Package Manager
yarn
System Info
Validations