TypeScript · Modules
resolvePackageJsonImports
Use the package.json 'imports' field when resolving imports.
Syntax
"resolvePackageJsonImports": trueExample
Example
{
"compilerOptions": {
"resolvePackageJsonImports": true
}
}More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.