Replies: 2 comments 5 replies
-
The problem is that the current version of Modern.js server doesn't manage MF products well enough. Previously, we recommended developers to upload all MF products to CDN (for example, manifest.json, remoteEntry.js, etc.) instead of directly using the Modern.js server. Therefore, when using the Modern.js server to handle these resources (for example, For example, you mentioned "404". I think it's because when you configure We have fixed all these issues in the latest MR like #7155. I believe you can find the answer in this issue #7075. I've released the latest code to the canary version and verified it in the repository provided by joselrodrigues. These changes will be released in Thursday's version, and then I will update the examples in Modern.js Example. After this, the application of SSR or CSR, whether you run it with In the production environment, you can deploy MF resources directly using the server of Modern.js without upload resources to CDN, and keep it consistent with the development phase. The only thing you need to do is configure |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I still try to setup an working Module Federation to use by my Company. After tackling a while with different Build tools (all based on rspack for the most part) I struggle hard to integrate an modern js remote into an modern js host application.
It still tries to load the remote sources from its own domain (eg
mf-host-app.internal.domain
) and after that I tried to put angetPublicPath
configuration to themodule-federation.config.ts
but it seems that this gets somehow overwritten.When I then configure
output.assetPrefix
as mentioned in the docs it also appears into something wich I would assume is thegetPublicPath
function from Module Federation. (when I'm closer look into the remoteEntry.js in the build output).So far so fine but weirdly enough the
modern deploy
starts to respond on all routes with the generatedindex.html
instead of serving assets, and I still struggling to find the root cause of that.As I'm unsure now what should I use to deploy my Application correctly ? And it is maybe noteworthy to prefer
assetPrefix
overgetPublicPath
?I double checked the examples regarding that as well but could not find any clue why
assetPrefix
causes such a weird behaviour.Greetings
Beta Was this translation helpful? Give feedback.
All reactions