Trying to find source code for CommonJS modules

1,105 views
Skip to first unread message

Alexander Mills

unread,
Jan 19, 2016, 9:28:51 PM1/19/16
to CommonJS
@all

I am trying to find the source code for how CommonJS modules are actually loaded. I have been using Node.js for almost a year and a half and still cannot say for sure how module loading actually works.

I have been to:


but I didn't see any links to source code. I would guess it's on Github somewhere?

please let me know, thanks!

-alex

Kevin Dangoor

unread,
Jan 20, 2016, 9:41:54 AM1/20/16
to comm...@googlegroups.com
Node has good documentation on how its module system works:

https://nodejs.org/api/modules.html

and you can find the Node source code here:

https://github.com/nodejs/node

Kevin

--
You received this message because you are subscribed to the Google Groups "CommonJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commonjs+u...@googlegroups.com.
To post to this group, send email to comm...@googlegroups.com.
Visit this group at https://groups.google.com/group/commonjs.
For more options, visit https://groups.google.com/d/optout.

Louis Santillan

unread,
Jan 20, 2016, 3:43:15 PM1/20/16
to comm...@googlegroups.com

Kris Kowal

unread,
Jan 20, 2016, 8:24:08 PM1/20/16
to CommonJS
There are a bunch of CommonJS implementations.

This is my most recent incarnation of a module loader that Tom Robinson started for running npm-compatible CommonJS in web pages (refresh to reload in dev + bundle for prod).

Reply all
Reply to author
Forward
0 new messages