Use require.resolve when deleting key in require.cache
Created by: ofabel
I would suggest to replace the following line: https://github.com/NightlyCommit/twing/blob/56e186b58ef05d8e2f17ae2a66a2522a40bae76d/src/lib/cache/filesystem.ts#L47
With this:
delete cache[require.resolve(modulePath)];
Why is this necessary? Packages like https://github.com/vercel/ncc use their own require.cache implementation. This small fix ensures twing's cache to work as expected when bundled with ncc.
Edited by Eric MORAND