Calling require("node:path") was added in Node v14.18.0, but tsup adds the nodeProtocolPlugin to the list of esbuild plugins whenever building for cjs. I'd like to be able to build for cjs while targeting Node >= 14.18 and preserve the original node: require path. It also seems like this is unnecessary since esbuild handles this here:
Calling
require("node:path")
was added in Node v14.18.0, but tsup adds thenodeProtocolPlugin
to the list of esbuild plugins whenever building forcjs
. I'd like to be able to build for cjs while targeting Node >= 14.18 and preserve the originalnode:
require path. It also seems like this is unnecessary since esbuild handles this here:https://github.com/evanw/esbuild/issues/1760
Upvote & Fund