How does Node.js/Electron require() and Atom packages work?


What I mean, is, are Atom packages using the native Node.js require? Or are they using a patched version of it (f.e. maybe it allows the Atom environment to pass runtime references to packages)?

In other words, when I write an Atom package, and I write require('something') inside my package, what’s happening? Is it using plain regular Node.js require, or is it intercepted by Atom, and if so, what does Atom make it do?


For example, the teletype package has a line that imports @atom/teletype-client. Does this get imported the regular Node.js way? If so, are there any other cases where imports do not happen the Node.js way?