Closed TimDaub closed 2 years ago
I don't think this is a bug. If you see this test of non-ESM, quibble has always supported faking non-existent paths
I found it quite confusing and it cost me some time only understanding that it wouldn't throw.
Maybe, would you be willing to allow the esm function to throw if a special input is passed. Or maybe a safeEsm
function that always throws?
Otherwise, maybe making people more aware in the readme could help too.
I understand your point, but because this is a mature/stable/low-config library I would not support a new option for branching behavior like this. Happy to look at a PR that warns replacing paths to non-existent files is supported, however
when you run
node index.mjs
it just returnsundefined
. My expectation is that it should throw.