3 ms·
I was talking about Browser-side, the cleaner node.js solution is to use the "exports{}" map in the package.json [1] that I mentioned before. Personally, I wou
by cookiengineer 6y ago
I was talking about Browser-side, the cleaner node.js solution is to use the "exports{}" map in the package.json [1] that I mentioned before.
Personally, I wouldn't recommend to override the require.resolve or import.meta.resolve algorithm, as this is heavily experimental.
[1] https://nodejs.org/api/packages.html#packages_exports https://nodejs.org/api/packages.html#packages_exports