More and more packages moving to ESM format and start using package subpath exports like this (example from lingui lib)
{
"name": "@lingui/cli",
"exports": {
"./api": {
"types": "./dist/api/index.d.ts",
"default": "./dist/api/index.js"
},
"./api/extractors/typescript": {
"types": "./dist/api/extractors/typescript.d.ts",
"default": "./dist/api/extractors/typescript.js"
}
},
}
And FS Monkey is unable to resolve require calls like require('@lingui/cli/api').
Specification is stable since node 14
v20 docs: https://nodejs.org/docs/latest-v20.x/api/packages.html#subpath-exports
see also #378 (same issue with partial solution)
More and more packages moving to ESM format and start using package subpath exports like this (example from lingui lib)
{ "name": "@lingui/cli", "exports": { "./api": { "types": "./dist/api/index.d.ts", "default": "./dist/api/index.js" }, "./api/extractors/typescript": { "types": "./dist/api/extractors/typescript.d.ts", "default": "./dist/api/extractors/typescript.js" } }, }And FS Monkey is unable to resolve require calls like
require('@lingui/cli/api').Specification is stable since node 14
v20 docs: https://nodejs.org/docs/latest-v20.x/api/packages.html#subpath-exports
see also #378 (same issue with partial solution)