Replies: 4 comments
-
|
This gives me the results I desire: But this doesn't: Seems like an issue to do with naked imports. I think the bug is related to something going on here: https://bun.sh/docs/runtime/modules#importing-commonjs-from-commonjs
|
Beta Was this translation helpful? Give feedback.
-
|
Looks like its being detected as a "node-fallback", but its actually not a node built-in. There is also Line 31 in 557aac6 |
Beta Was this translation helpful? Give feedback.
-
|
See: #2040 (comment) |
Beta Was this translation helpful? Give feedback.
-
|
(I am not a Bun developer) To sort-of answer the original question for anyone else who finds this, the only tracing I've found for import resolution involves making a debug Bun binary.
Expect it to run slowly and to be moderately chatty. Also expect a lot of memory debugging after the script finishes (and a delay). The debug logging from the bundler is not exactly written for muggles like you or me, but combined with skimming the code may give you an inkling of what's going on. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to debug how Bun is resolving something?
I am working in a pnpm monorepo.
It seems that
supports-coloris resolving to a newer version where thesupportsColorexport was removed.I logged the resolved path like so:
And I get this:
7.2.0 is the correct package version. But when I try to modify the exports from the path on disk, they are not being changed.
Here is the output:
Beta Was this translation helpful? Give feedback.
All reactions