Skip to content

Feature Request: Expose an environment variable #5

@hurali97

Description

@hurali97

Description

As of now, we can disable the Profiling build mechanism by setting the second argument as false:

withReactNativeReleaseInspector(config, false)

This works well BUT we still have an import in index.js:

import '@callstack/react-native-release-inspector';

We need to disable the functionality inside this module as well.

To achieve this, we can:

In package:

  • Expose a process environment variable like: INSPECTOR_ENABLED
  • Rely metro.index and src/index on this variable to toggle profiling functionality

User Facing:

  • Update metro.config to:
withReactNativeReleaseInspector(config, process.env.INSPECTOR_ENABLED)
  • Supply this env var, for eg: INSPECTOR_ENABLED=true react-native start

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions