Comando Line Tool
Module Federation provides a lightweight command-line tool mf, shipped by @module-federation/enhanced.
Once you have completed integration by seguintes an integration guia, @module-federation/enhanced is typically já in your dependência tree and this command is available out of the box. Caso contrário, install it manually in seu projeto before running the commands below.
View All Comandos
If you need to view all available CLI commands, please run the following command in the project directory:
Output:
Common Opções
Module Federation CLI fornece some comum opções esse pode ser usado for all comandos:
mf dts
mf dts
é usado para pull ou generate tipo TypeScript declaration arquivos.
The mf dts command will automatically generate or pull type declaration files baseado em the configuração in module-federation.configuração.ts. Isso means you must provide a valid configuração file, caso contrário the command will not run correctly.
If you are only using the runtime API, you need to criar a temporary module-federation.configuração.ts file, configure dts.consumeTypes.remoteTypeUrls, and then run the mf dts command.