You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Please clear the playground index.ts before testing these. tsserver actually recommends "@playground/shared/utils" if it's already there.)
Now in bar/, if I import something from shared/utils/index.ts, it'll recommend import { greetings } from "@playground/shared/utils/index". I guess this part is similar to #51418.
Another issue is that if I import something from shared/utils/bonjour.ts, it'll recommend import { bonjour } from "@playground/shared/utils/bonjour".
π Actual behavior
// import { greetings } from "@playground/shared/utils/index" <- Nope// import { bonjour } from "@playground/shared/utils/bonjour" <- Nopeimport{bonjour,greetings}from"@playground/shared/utils"console.log(greetings())console.log(bonjour())
Both the two 'nope' import recommendations result in runtime import errors.
π Expected behavior
It recommends the re-exports from @playground/shared/utils.
Additional information about the issue
Please feel free to close this if the underlying issue is the same as ##51418's.
π Search Terms
"package.json exports", "monorepo exports"
π Version & Regression Information
β― Playground Link
https://github.com/Frederick888/playground/tree/monorepo
π» Code
I'm setting up a monorepo where there are a few 'executables' and a shared package. In the example repo, it's structured this way:
(Please clear the playground index.ts before testing these.
tsserver
actually recommends"@playground/shared/utils"
if it's already there.)Now in
bar/
, if I import something fromshared/utils/index.ts
, it'll recommendimport { greetings } from "@playground/shared/utils/index"
. I guess this part is similar to #51418.Another issue is that if I import something from
shared/utils/bonjour.ts
, it'll recommendimport { bonjour } from "@playground/shared/utils/bonjour"
.π Actual behavior
Both the two 'nope' import recommendations result in runtime import errors.
π Expected behavior
It recommends the re-exports from
@playground/shared/utils
.Additional information about the issue
Please feel free to close this if the underlying issue is the same as ##51418's.
Also I'm not sure whether #58657 is relevant.
The text was updated successfully, but these errors were encountered: