My React Native app is part of a monorepo. All the "buildables" (api, backend, website) are written in TypeScript and built with Webpack.
All of them use inversify. Therefore, the configuration to make decorators work is kind of duplicated in both Webpack and Metro/Babel configuration. Plus, some things are not working the same and require additional babel plugins.
I've checked pretty much everywhere but did not find an answer :
What concretely prevents us from using Webpack to build a RN app and completely get rid of Metro/Babel ? (except dev tools like HMR, etc.)
CodePudding user response:
have you checked repack? it might help you if i'm understanding your problem correctly https://github.com/callstack/repack
CodePudding user response:
I've ended up splitting my build process in 2 parts :
- Webpack takes my
index.tsx
and builds anindex.js
viats-loader
(using anode
target) - Metro takes this
index.js
as entrypoint
Since it's already transpiled, no need to define complex mechanism for Metro to build TypeScript