Skip to content

Module Loading ​

require ​

JS
    require(string path)

Loads and executes the JS module at the specified path.

Parameters

  • string path: Module path, supports relative paths. Relative paths are resolved against the directory of the game entry script file.

requirePlugin ​

JS
    requirePlugin(string pluginName)

Loads and executes the specified plugin, returning the object exported by the plugin.

Parameters

  • string pluginName: Plugin name, corresponding to a key in the plugins configuration of manifest.json.