Options
All
  • Public
  • Public/Protected
  • All
Menu

Since NODE_ENV is a fairly common way to toggle behavior, Babel also includes an API function meant specifically for that. This API is used as a quick way to check the "envName" that Babel was loaded with, which takes NODE_ENV into account if no other overriding environment is set.

see

https://babeljs.io/docs/en/next/config-files#apienv

Hierarchy

  • EnvFunction

Callable

  • __call(): string
  • __call(envName: string | ReadonlyArray<string>): boolean
  • __call<T>(envCallback: function): T
  • Since NODE_ENV is a fairly common way to toggle behavior, Babel also includes an API function meant specifically for that. This API is used as a quick way to check the "envName" that Babel was loaded with, which takes NODE_ENV into account if no other overriding environment is set.

    Returns string

    the current envName string

  • Since NODE_ENV is a fairly common way to toggle behavior, Babel also includes an API function meant specifically for that. This API is used as a quick way to check the "envName" that Babel was loaded with, which takes NODE_ENV into account if no other overriding environment is set.

    Parameters

    • envName: string | ReadonlyArray<string>

    Returns boolean

    true if the envName is === any of the given strings

  • Since NODE_ENV is a fairly common way to toggle behavior, Babel also includes an API function meant specifically for that. This API is used as a quick way to check the "envName" that Babel was loaded with, which takes NODE_ENV into account if no other overriding environment is set.

    Type parameters

    Parameters

    • envCallback: function

    Returns T

Generated using TypeDoc