Closed Raynos closed 4 years ago
Question about ESM that's kind of unrelated to node-osc
node-osc
In the source code I see import { createSocket } from 'dgram';
import { createSocket } from 'dgram';
The implementation of dgram is CJS and it does not have an export createSocket statement.
dgram
export createSocket
https://github.com/nodejs/node/blob/v14.0.0/lib/dgram.js
How does this work ?
This was answered on twitter https://twitter.com/MylesBorins/status/1252992647872032769
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 anexport createSocket
statement.https://github.com/nodejs/node/blob/v14.0.0/lib/dgram.js
How does this work ?