We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c489a7e commit 6362670Copy full SHA for 6362670
lib/internal/errors.js
@@ -1117,8 +1117,7 @@ E('ERR_INVALID_PACKAGE_TARGET',
1117
return `Invalid "exports" main target ${JSONStringify(target)} defined ` +
1118
`in the package config ${pkgPath}${sep}package.json${relError ?
1119
'; targets must start with "./"' : ''}`;
1120
- } else if (typeof target === 'string' && target !== '' &&
1121
- !StringPrototypeStartsWith(target, './')) {
+ } else if (relError) {
1122
return `Invalid "exports" target ${JSONStringify(target)} defined for '${
1123
StringPrototypeSlice(key, 0, -subpath.length || key.length)}' in the ` +
1124
`package config ${pkgPath}${sep}package.json; ` +
0 commit comments