namespace require
Description
Properties of the require() function
Class properties
-
alias #
require.alias -> ObjectDictionary of aliases. The top-level module id is designated by a string only. There is no recursive alias lookup. Aliases will be resolved before anything else.
-
module_cache #
require.module_cache -> ObjectDictionary of loaded modules.
-
paths #
require.paths -> ArraySearch paths for the default module loader. The
pathsparameter itself is read-only, meaning you cannot reassign torequire.paths– to make changes use one of the Array functions, such as push. -
preload #
require.preload -> ObjectDictionary of callback functions. The first time a top-level module name matching a key in
perloadis loaded, the function stored there will be called.