Replies: 3 comments 3 replies
-
good idea! Now modern.js not support it. but we can disscuss here. In bytedance, we support cross project bff, maybe its can also use here. |
Beta Was this translation helpful? Give feedback.
-
I made it to work with configuring the Request correctly, it took a while until I found the configure hook correctly. with import { configure } from '@modern-js/plugin-bff/runtime/create-request';
// ...
configure({
setDomain() {
return 'http://localhost:<port>';
},
}); It worked at least locally, have to tinker around how I can pass it for production build. |
Beta Was this translation helpful? Give feedback.
-
@keepview Maybe we can check if there is a more automated way! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm not sure if this is officially used in this way but I'm curious if its possible to share an Component wich is using an
bff
function via Module Federation.After enabling BFF everything works fine as expected in my producer Application.
But on the Host it obviously fetches not the original producer Application, instead it calls simply
/api/lamda/hello
but I asked myself the Question if its somewhere configurable to add automatically the host adress from the Server to this kind of requests.Am I only to naive to have this use case in mind ?
Beta Was this translation helpful? Give feedback.
All reactions