-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Versions
- vite-plugin-federation: v1.1.9
- vite: v3.0.9
Reproduction
https://github.com/hlassiege/nuxt-vite-federation-plugin
Steps to reproduce
First of all, thanks a lot for this plugin. I'd like to use it with Nuxt 3 and Vite is the default builder.
To reproduce :
- Checkout the repository https://github.com/hlassiege/nuxt-vite-federation-plugin
- The remote component is exposed in the navbar folder. Use npm to install, build and serve the files
- remoteEntry.js is exposed on http://localhost:5001/assets/remoteEntry.js
- in app-front folder, use npm install and then npm run dev
What is Expected?
The application should launch successfully and display the remote component.
It's important to note that it's possible to make this example work if :
- shared: ['vue'] is removed, hence we don't optimize bundle size
- we disable SSR but it defeat the goal of nuxt
What is actually happening?
When the application start, there is cryptic error :
ERROR Cannot read properties of undefined (reading '_optimizeDepsMetadata')
Then when attempting to go to http://localhost:3000 we have the following error in the log
[nitro] [dev] [unhandledRejection] TypeError: Cannot read properties of undefined (reading 'stubModule')
at __instantiateModule__ (file:///C:/Dev/src/divers/micro-frontend/app-front/.nuxt/dist/server/server.mjs:3932:11)
at __ssrLoadModule__ (file:///C:/Dev/src/divers/micro-frontend/app-front/.nuxt/dist/server/server.mjs:3923:25)
at ssrImport (file:///C:/Dev/src/divers/micro-frontend/app-front/.nuxt/dist/server/server.mjs:3948:13)
at ssrDynamicImport (file:///C:/Dev/src/divers/micro-frontend/app-front/.nuxt/dist/server/server.mjs:3959:12)
at file:///C:/Dev/src/divers/micro-frontend/app-front/.nuxt/dist/server/server.mjs:2984:11
I don't know if it's only a configuration issue or something more important.
nicolaspayot, lkononenko, CloudBranch, sebastianestradaintcomex and allyesdevCloudBranch, ecarrascot and frosato-dev
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working