|
@ -65,12 +65,24 @@ value from this object, the next `require` will reload the module. |
|
|
|
|
|
|
|
|
* {Array} |
|
|
* {Array} |
|
|
|
|
|
|
|
|
|
|
|
Stability: 0 - Deprecated |
|
|
|
|
|
|
|
|
Instruct `require` on how to handle certain file extensions. |
|
|
Instruct `require` on how to handle certain file extensions. |
|
|
|
|
|
|
|
|
Process files with the extension `.sjs` as `.js`: |
|
|
Process files with the extension `.sjs` as `.js`: |
|
|
|
|
|
|
|
|
require.extensions['.sjs'] = require.extensions['.js']; |
|
|
require.extensions['.sjs'] = require.extensions['.js']; |
|
|
|
|
|
|
|
|
|
|
|
**Deprecated** In the past, this list has been used to load |
|
|
|
|
|
non-JavaScript modules into Node by compiling them on-demand. |
|
|
|
|
|
However, in practice, there are much better ways to do this, such as |
|
|
|
|
|
loading modules via some other Node program, or compiling them to |
|
|
|
|
|
JavaScript ahead of time. |
|
|
|
|
|
|
|
|
|
|
|
Since the Module system is locked, this feature will probably never go |
|
|
|
|
|
away. However, it may have subtle bugs and complexities that are best |
|
|
|
|
|
left untouched. |
|
|
|
|
|
|
|
|
## __filename |
|
|
## __filename |
|
|
|
|
|
|
|
|
<!-- type=var --> |
|
|
<!-- type=var --> |
|
|