Commit Graph

1 Commits (24ed8da48ee11b0d4130f1c71a448db59c83f607)

Author SHA1 Message Date
Myles Borins 2c3c9f5a3f
module: better error for named exports from cjs
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-08 15:35:16 -04:00