originjs / vite-plugin-federation

Module Federation for vite & rollup
Other
2.39k stars 241 forks source link

Bug with Vite #613

Open jtan80813 opened 4 months ago

jtan80813 commented 4 months ago

Versions

Steps to reproduce

Try adding shared in vite.config.ts Ex:

federation({
      name: "host-app",
      remotes: {
        remoteRemixApp: "http://localhost:3010/assets/remoteEntry.js",
      },
      shared: ["react", "react-dom"],
}),

What is Expected?

Should not output react-dom cannot be external

What is actually happening?

When building it, it errors out saying like Entry module "react-dom" cannot be external.