Open cirospaciari opened 1 month ago
1.1.26+0a37423ba
Darwin 23.6.0 arm64 arm
import * as Module from "node:module"; console.log(Module._pathCache); // undefined in bun
node.js output:
[Object: null prototype] { '/Users/cirospaciari/Repos/bun/test.mjs\x00': '/Users/cirospaciari/Repos/bun/test.mjs' }
Module._pathCache should be defined like in node.js:
/** @type {Record<string, string>} */ Module._pathCache = { __proto__: null };
undefined
This would improve compatibility with: tailwindcss-intellisense https://github.com/tailwindlabs/tailwindcss-intellisense/issues/1021 Nuxt https://github.com/oven-sh/bun/issues/3771
Node.js code: https://github.com/nodejs/node/blob/5a22d8e0134e9f161071e5b67922be1576f8db16/lib/internal/modules/cjs/loader.js#L310
interesting one!
What version of Bun is running?
1.1.26+0a37423ba
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
node.js output:
What is the expected behavior?
Module._pathCache should be defined like in node.js:
What do you see instead?
Additional information
This would improve compatibility with: tailwindcss-intellisense https://github.com/tailwindlabs/tailwindcss-intellisense/issues/1021 Nuxt https://github.com/oven-sh/bun/issues/3771
Node.js code: https://github.com/nodejs/node/blob/5a22d8e0134e9f161071e5b67922be1576f8db16/lib/internal/modules/cjs/loader.js#L310