I’m trying to use some npm packages (csv-parse for example) in workers. The package use the stream
node API and requires stream
. The cloudflare docs say that everything must require node:stream
.
Is there anyway to force these external packages to import from node:stream
(or similar core APIs) instead of stream
?
I’ve stumbled through trying to get my tsconfig
to alias paths for me but that’s not working. Similarly module-alias
doesn’t seem to do the trick either.
How can we use npm packages that haven’t updated to import/require from the node:
set of core APIs?