module-federation-examples
module-federation-examples copied to clipboard
Build on build server without @mf-types in repository
Hello. I have a project that has a shell app (host app) and 5 remote apps using MF 2.0. Currently when we run pnpm run dev everything works as expected including the type checking. We currently have @mf-types in our gitignore file so mf-types directory is not in the repository.
When we attempt to build the host app on remote build server (Azure DevOps) the builds fail because mf-types does not exist so the types do not exist.
error TS2307: Cannot find module 'remoteApp1/components/myComponent' or its corresponding type declarations.
How do I go about building with typescript on a build server?
ts-ignore or commit the types dir