Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1011 Bytes

File metadata and controls

35 lines (25 loc) · 1011 Bytes
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > IImportResolveOptions > allowSelfReference

IImportResolveOptions.allowSelfReference property

If true, then resolvePath is allowed to refer to the package.json of the active project.

Signature:

allowSelfReference?: boolean;

Remarks

This will take precedence over any installed dependency with the same name. Note that this requires an additional PackageJsonLookup calculation.

Example:

// Returns an absolute path to the current package
Import.resolveModulePath({
  resolvePath: "current-project",
  basePath: process.cwd(),
  allowSelfReference: true
})