oblador / react-native-performance

📐 Monitor and measure React Native performance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Disable via ENV

jakobo opened this issue · comments

When users are building on the expo framework, the EAS remote build system runs with the CI=1 ENV value set, which automatically disabled Flipper. (ref). This makes it possible to make a build that autolinks react-native-performance, but with Flipper missing.

Proposal
If we could add an ENV check to the autolink podspec, rnp could be explicitly disabled for a build. Unfortunately, the default of ENV['CI'] doesn't work in expo because of the linked docs above.

if !ENV['RNP_DISABLE'] == '1' then
  Pod::Spec.new do |s|
  # ...
end

Related

You can control this via react-native.config.js which is what I’d recommend instead

Thanks. I'll let the OP know they can use react-native.config.js to disable auto-linking this library when they're making a non-flipper build.