teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.89k stars 929 forks source link

module federation dependencies mis-used #9305

Open XRFate opened 7 hours ago

XRFate commented 7 hours ago

Describe the bug

module-ferderation-webpack example required rs-pack dependency

itaymendel commented 7 hours ago

hi, i do not understand the issue. rspack is used via the rspack plugin here - https://bit.cloud/frontend/module-federation/react/producer/~code/producer.bit-app.ts#l1

the dependency graph does not show packages, only components.

XRFate commented 6 hours ago

sorry about this misunderstanding, the producer example suppose to require webpack but instead it requires mf-rspack type

import { MfReact } from '@frontend/module-federation.react.apps-types.mf-rspack';

I don't know if this is the problem that resulted in

Could not load content for webpack://producer/remote-scope/react/producer/button.tsx (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

when i try to bit run it i found in debug panel source tab, with button.tsx was not being loaded