Skip to content

Commit

Permalink
More docs for import maps
Browse files Browse the repository at this point in the history
  • Loading branch information
dobesv committed Sep 13, 2023
1 parent e3c2980 commit 7ef1eca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ function detect(detectors, node, deps) {
// dependency starts with '#' and we have a matching entry in "imports" in
// the package.json we'll substitute the possible mapped imports in place of
// that dependency.
//
// Conditions can be well-known ones implemented by node, TypeScript, or webpack like
// "import", "browser", "types", or "require". They can also be custom ones as configurable
// in webpack configuration or using the enhanced-resolve package.
//
// See also:
// - https://nodejs.org/api/packages.html#subpath-imports
// - https://www.typescriptlang.org/docs/handbook/esm-node.html
// - https://webpack.js.org/configuration/resolve/#resolveconditionnames
function applyImportsMap(importsMap, dep) {
const resolvedDeps = [];

Expand Down

0 comments on commit 7ef1eca

Please sign in to comment.