mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00

Exposes a module registration API, that webpack users can use to bundle "dynamic" modules that are required through some variable. Falls back to the require API if no module is registered. Reworked dynamic `require` code to use module-loader: - navigation: ui/frame. - XML UI build ui/builder/builder and ui/builder/component-builder. - module on-demand loads in global functions: globals.
Globals module for defining functions part of the global context - you need only to call require for this module and all globals will be registered. For example:
require("globals");
setTimeout(function(){ console.log("Test"); }, 2000);
Global functions/objects are: setTimeout, clearTimeout, setInterval, clearInterval and console.