A really strange error...
src/foo.ts
imports from Node internal:
import type { Writable } from 'node:stream'
tsup config:
{
"clean": true,
"sourcemap": true,
"watch": false,
"silent": true,
"entry": [
"src/index.ts"
],
"dts": {
"resolve": true
},
"tsconfig": "tsconfig.build.json",
"outDir": "lib",
"format": [
"cjs",
"esm"
],
"shims": true,
"target": "node18.19.1"
}
Marking the node:stream
package as external fixes the problem.
"external": [
"node:stream"
],
Am I doing something wrong?
I have never had to add externals to the list in any other packages before.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too