MylesBorins / node-osc

Open Sound Control protocol library for Node.js
GNU Lesser General Public License v3.0
435 stars 72 forks source link

How can you import from `dgram` if it does not export ? #35

Closed Raynos closed 4 years ago

Raynos commented 4 years ago

Question about ESM that's kind of unrelated to node-osc

In the source code I see import { createSocket } from 'dgram';

The implementation of dgram is CJS and it does not have an export createSocket statement.

https://github.com/nodejs/node/blob/v14.0.0/lib/dgram.js

How does this work ?

Raynos commented 4 years ago

This was answered on twitter https://twitter.com/MylesBorins/status/1252992647872032769