Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup failed to resolve import "__federation_fn_satisfy" from "virtual:__federation_fn_import #549

Open
mannymu opened this issue Nov 29, 2023 · 8 comments

Comments

@mannymu
Copy link

mannymu commented Nov 29, 2023

Versions

  • vite-plugin-federation: 1.3.3
  • vite: 4.5.0

Reproduction

This error occurs in the server build of vue SSR

Steps to reproduce

What is Expected?

What is actually happening?

@JessYan0913
Copy link

同问

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The same question

@JessYan0913
Copy link

image
Why did I fail to introduce 'virtual:federation' and the console prompt: virtual:__federation__ does not exist

image

@MarishKo
Copy link

The same question. Any ideas?

@AttackXiaoJinJin
Copy link

same,please fix it

image

@AntonyF-Andreani
Copy link

In m case the only way is to put in ignore of optimization, other wa is set as external because this function is virtual and injected b plugin.

I use this because I'm use import {} from "federation"

optimizeDeps: {
        exclude: ["__federation__"],
      },

@SrikanthVH
Copy link

SrikanthVH commented Jan 19, 2024

Looks like there is some problem with the shared modules. I commented out shared attribute, its working.

federation({
			  name: 'host-app',
			  remotes: {
				  svelte_remote_app: "http://localhost:3999/assets/remoteEntry.js",//"http://localhost:5173/assets/remoteEntry.js",
				  react_remote_app: "http://localhost:3998/assets/remoteEntry.js"//"http://localhost:5173/assets/remoteEntry.js",
			  },
			  //shared: ['svelte',"react","react-dom"]   <- Commented
			}),

@Kronenberg
Copy link

Same issue for me, I am using Remix.js framework which is SSR with latest versions of react and "vite": "^5.1.0";
and if I am using shared: ["react", "react-dom"] it doesn't work for me and I am getting same error as others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants