Replies: 1 comment 2 replies
-
Prior to Node.js 12, all files were treated as CommonJS files by default. ESM was not supported (outside of the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following the documentation, lets say that since Node.js v12 we can be more specific about ES or CJS modules with:
.cjs
file extension.mjs
file extensiontype
field inpackage.json
However, one thing that i failed to find and am curious about - how are these file extensions handled in Node.js versions prior to 12?
Beta Was this translation helpful? Give feedback.
All reactions