fix(coding-agent): use ESM resolution for extension alias fallback (#1821)
The previous fix (83b57924) replaced require.resolve() with bare
specifier fallbacks to avoid ERR_PACKAGE_PATH_NOT_EXPORTED for ESM-only
packages like pi-ai. However, bare specifiers are not valid jiti alias
targets, breaking extension loading in global npm installs.
Use import.meta.resolve() as the fallback instead. It respects the
"import" exports condition and returns a real file path.
This commit is contained in:
committed by
GitHub
parent
f430dce00a
commit
1ce870db1b
@@ -94,6 +94,6 @@
|
||||
"directory": "packages/coding-agent"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
"node": ">=20.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user