Closed RobinTail closed 2 months ago
Node protocol removal was introduced here for CJS: https://github.com/egoist/tsup/pull/460
The target was set to es2022 which does not explicitly address Node, therefore it was removed for ESM too.
es2022
Setting the target to node18.18.0 enabled the protocol for ESM.
node18.18.0
The recently added setting allows also to enable it for CJS: https://github.com/egoist/tsup/commit/e7ced3474a559e35fc5b9cbd4cfd4aa39d44e0c0
This will certainly not work in Node below 14.18, but it should not anyway.
coverage: 100.0%. remained the same when pulling c04b7f915710e06026e2972da6c3fa53537e9630 on preserve-node-protocol into 81f14a90ab748b5b523d8b63cf32c1d005d1fcd6 on master.
✅ manually checked the diff: only protocol is the difference
Node protocol removal was introduced here for CJS: https://github.com/egoist/tsup/pull/460
The target was set to
es2022
which does not explicitly address Node, therefore it was removed for ESM too.Setting the target to
node18.18.0
enabled the protocol for ESM.The recently added setting allows also to enable it for CJS: https://github.com/egoist/tsup/commit/e7ced3474a559e35fc5b9cbd4cfd4aa39d44e0c0
This will certainly not work in Node below 14.18, but it should not anyway.