How does Node.js handle ES modules?

Viewed 36

If Node.js doesn't have native support for ECMAScript modules, import statements, and export statements, then what does it do process those things? Does it convert them to CommonJS-compatible code before running them? There isn't any obvious portion of the source that handles this task, so what handles it? How does it preserve the read-only nature of read-only views?

0 Answers
Related