repack
repack copied to clipboard
build two miniapps in a apk
Ask your Question
I need build two or more mini apps in a apk, and acces chunk local
Can you provide more information? Some example or repro project?
I published an issues with all the information of my projects. Issue #151 . I need to build both projects in one apk/ipa
The problem in #151 is likely caused by duplicated react-native-reanimated
dependency - you need to somehow (depends on your setup) ensure there's only single react-native-reanimated
. If you're using Module Federation, react-native-reanimated
must be added to shared
in every container: https://github.com/zamotany/module-federation-repack/blob/main/host/webpack.config.js#L313-L318
For reference: https://github.com/zamotany/module-federation-repack/pull/4
If you need to have 2 or more miniapps, you need to alter the XCode/Gradle build step to copy additional miniapps or you could create a Webpack plugin or use https://github.com/webpack-contrib/copy-webpack-plugin to copy miniapps as part of the host
Webpack compilation.
In Re.Pack 2, the easiest way to do so is to use process.env[CLI_OPTIONS_ENV_KEY]
and take bundleOutput
, similarly to have OutputPlugin
does it: https://github.com/callstack/repack/blob/2.x/packages/repack/src/webpack/plugins/OutputPlugin.ts#L57-L77
Closing as the issue became stale, and answer was provided.