nl_tokens: Try to handle with require () .
pl_tokens: function registerMod ( leaf , dir , name ) { var modPath ; try { modPath = require . resolve ( dir ) ; } catch ( _error ) { } if ( modPath == null ) { return false ; } // Define a getter with the base name. name = path . basename ( name , path . extname ( name ) ) ; Object . defineProperty ( leaf , name , { configurable : true , enumerable : <mask> , get : function ( ) { if ( require . cache [ modPath ] == null ) { debug ( 'loading %s.' , modPath ) ; } return require ( modPath ) ; } } ) ; return true ; }