requirePackage(cwd, _require, [customEntry])

source/index.js

Cycle through the editions for a package and require the correct one

Parameters

  • string cwd :

    the path of the package, used to load package.json:editions and handle relative edition entry points

  • function _require :

    the require method of the calling module, used to ensure require paths remain correct

  • string = customEntry :

    an optional override for the entry of an edition, requires the edition to specify a directory property

Returns

void