graaljs
graaljs copied to clipboard
About builtin commonjs cache
unlike node.js, when I use Context with CommonJS enabled, require.cache is not defined.
I noticed that cjs cache is actually here:
com.oracle.truffle.js.runtime.JSRealm#commonJSRequireCache
but can't find a decent way to remove or clear it. if there is an approach to clear it , I'd like to know it. If there isn't, could this feature be added to graaljs-cjs?
anyone noticed me?
Hi, Thank you for reaching out, I'll check with the JS team about this and get back to you
no, we don't support require.cache in our implementation, and commonJSRequireCache is internal. There are no plans to add support for require.cache in the near future (as far as I know) and our commonjs emulation is not 100% compatible with node.js
I've created a feature request to add support to this. Tracked internally at GR 41317
We currently have no plans to add support for this, sorry.