Skip to content

Documentation / @warp-drive/build-config / babel-macros

Babel plugins that convert constants and expressions into macroConditions so that they can be stripped from the code during the build process.

This allows us to have great DX around common configuration patterns while still being able to ship a small and fast library.

Transforms

  • deprecation constants imported from @warp-drive/build-config/deprecations
  • feature flags imported from @warp-drive/build-config/canary-features
  • debug logging constants imported from @warp-drive/build-config/debugging
  • environment constants imported from @warp-drive/build-config/env
  • expressionts imported from @warp-drive/build-config/macros

Addons and apps can use these plugins to match the code-stripping behaviors of WarpDrive. This is useful when managing migrations for canary features and deprecations.

Functions

Released under the MIT License.