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