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
my-lib contains an index.ts with a simple exported function myLibFunction()
my-dyn-lib contains an index.ts that calls myLibFunction() from my-lib
my-app contains an index.ts that calls myLibFunction() from my-lib and does an import('../my-dyn-lib/index.ts')
my-lib is imported a second time when importing(my-dyn-lib),
if another dyn-lib2 is added, my-lib is imported again
----> my-lib imported <----
Hello from my-app!
my-lib function called
----> my-lib imported <----
Hello from my-dyn-lib
my-lib function called
my-app and my-dyn-lib have a dependency on my-lib as "my-lib": "file:../my-lib/my-lib-1.0.0.tgz"
with my-lib being just a bun pm pack
NOTE that the double import does not happen if the package.json has "my-lib": "file:../my-lib/"
$ cd my-lib
$ bun pm pack
$ cd ../my-dyn-lib
$ bun install ../my-lib/my-lib-1.0.0.tgz
$ cd ../my-app
$ bun install ../my-lib/my-lib-1.0.0.tgz
$ bun run index.ts
What version of Bun is running?
1.1.42+50eec0025
What platform is your computer?
Darwin 24.2.0 arm64 arm
What steps can reproduce the bug?
3 simple projects:
my-lib is imported a second time when importing(my-dyn-lib),
if another dyn-lib2 is added, my-lib is imported again
my-app and my-dyn-lib have a dependency on my-lib as "my-lib": "file:../my-lib/my-lib-1.0.0.tgz"
with my-lib being just a bun pm pack
NOTE that the double import does not happen if the package.json has "my-lib": "file:../my-lib/"
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
import-twice.zip
The text was updated successfully, but these errors were encountered: