metro icon indicating copy to clipboard operation
metro copied to clipboard

Feature: Create stubs for node requires

Open Cafe137 opened this issue 3 years ago • 0 comments

I have a dependency which requires fs and child_process for some functions, but not the ones I am using.

For development, this is solved by webpack:

config.node = { fs: 'empty', child_process: 'empty' }

When building with metro (RN + Expo SDK 41), this breaks:

Unable to resolve module child_process

Is there a way to instruct metro to create an empty stub for these modules?

Cafe137 avatar Jul 18 '21 08:07 Cafe137