-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Description
Citing from https://threejs.org/docs/#manual/en/introduction/Installation:
Second, Node.js support for ES modules is ... complicated. As of Node.js v12, the core library can be imported as a CommonJS module, with require('three'). However, most example components in examples/jsm cannot. Future versions of Node.js may resolve this, but in the meantime you may need to use workarounds like esm to enable your Node.js application to recognize ES modules.
As of latest Node (14.5.0 at the time of writing), ESM support in Node works as expected and nothing special is required (like using CLI flags or MJS extension). Therefore I would like to discuss whether it's appropriate to remove this section of the document.
If it is deemed so, I'll be happy to send in a PR removing it or rewording it.