Closed HUST-SE-LY closed 1 month ago
Just talked to @ScriptedAlchemy he will get a fix out ASAP.
try this version: @module-federation/bridge-vue3@0.0.0-next-20240718040714
, i think it should be fixed
try this version:
@module-federation/bridge-vue3@0.0.0-next-20240718040714
, i think it should be fixed
thx, it works.
I still have some questions. I use webpack and the second way below which is from official site will cause an error. it throws TypeError: t.loader is not a function
. The first way below looks good.
// right way
const container = bridge.createRemoteComponent({
loader: () => loadRemote('container/export-app'),
});
// wrong way in https://module-federation.io/practice/bridge/vue-bridge.html
const Remote2 = bridge.createRemoteComponent(() =>
loadRemote('container/export-app'),
);
And vue-router reports a warning
[Vue Router warn]: Component "default" in record with path "/container/:pathMatch(.*)*" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".
Yes, sorry, it should pass the loader
parameter, I will fix this. Thank you~
Describe the bug
After executing
pnpm add @module-federation/bridge-vue3@latest
, I found that there is nodist
directory in thebridge-vue3
package in node_modules, so I cannot importcreateBridgeComponent
.In addition, I found that
vue3-bridge
usesvue-router@3
instead ofvue-router@4
, so dependency conflicts are easy to occur.Is there any reason for this?Reproduction
https://github.com/HUST-SE-LY/mf-vue3-demo
Used Package Manager
pnpm
System Info
Validations