Description
Environment
Binaries:
Node: 12.16.3 - /var/folders/n3/x77mps511psc9z15lr2011dm0000gq/T/fnm_multishells/37908_1626302308407/bin/node
Yarn: 1.22.5 - /var/folders/n3/x77mps511psc9z15lr2011dm0000gq/T/fnm_multishells/37908_1626302308407/bin/yarn
npm: 6.14.4 - /var/folders/n3/x77mps511psc9z15lr2011dm0000gq/T/fnm_multishells/37908_1626302308407/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users//.gem/ruby/2.6.0/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 30
Build Tools: 28.0.3, 29.0.2, 30.0.3, 31.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64
Android NDK: Not Found
Description
Looks like the webpack.SourceMapDevToolPlugin
causes a crash with larger repositories. Adding the plugin webpack.EvalSourceMapDevToolPlugin
resolves the issue. But the bundler takes longer since SourceMapDevToolPlugin is still required by haul to resolve certain links.
Code changes to webpack config
webpackconfig.plugins.push(new EvalSourceMapDevToolPlugin({
exclude: /node_modules\/(?!(local_package1|local_package2|local_package3).*/,
}))
Reproducible Demo
You need a lerna monorepo that is massive. That imports a lot of expensive components and maybe some that are not fully optimized for react-native.