mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refactor: add __snapshot in d.ts and fix checks
This commit is contained in:
@@ -17,7 +17,7 @@ function registerOnGlobalContext(moduleName: string, exportName: string): void {
|
||||
}
|
||||
|
||||
export function installPolyfills(moduleName: string, exportNames: string[]) {
|
||||
if ((<any>global).__snapshot || (<any>global).__snapshotEnabled) {
|
||||
if (global.__snapshot) {
|
||||
const loadedModule = global.loadModule(moduleName);
|
||||
exportNames.forEach(exportName => global[exportName] = loadedModule[exportName]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user