Closed atk closed 2 years ago
uvu only shares/mimics the --require
argument. The docs don't/shouldn't say anywhere that it forwards the flags to node
– it can't since the uvu/bin.js
file is called directly & there's no child.spawn
call within the CLI.
Your workaround would be the only solution. Another option could be to define the NODE_OPTIONS
environment variable. I havent tried, but I think that might be respected by uvu's underlying node
process:
$ NODE_OPTIONS="--conditions=browser" uvu tests
If you saw a docs issue, please follow up and lemme know :) Thanks~!
That's maybe a capability that shouldn't be left undocumented ;-)
It's a Node thing and is documented by Node 😅
As you wish. I usually want to make things easy for the users of my packages.
While the documentation claims that uvu shares its arguments with node, the
--conditions
argument that allows to coerce node to load exports for the browser, does not work.This is especially useful in combination with jsdom. A workaround is to call uvu from node: