mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -33,7 +33,12 @@
|
|||||||
"forDevice": false,
|
"forDevice": false,
|
||||||
"prepare": false
|
"prepare": false
|
||||||
},
|
},
|
||||||
"configurations": {},
|
"defaultConfiguration": "main",
|
||||||
|
"configurations": {
|
||||||
|
"main": {
|
||||||
|
"flags": "--env.commonjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dependsOn": ["^build"]
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"prepare": {
|
"prepare": {
|
||||||
|
|||||||
@@ -30,6 +30,12 @@
|
|||||||
"forDevice": false,
|
"forDevice": false,
|
||||||
"prepare": false
|
"prepare": false
|
||||||
},
|
},
|
||||||
|
"defaultConfiguration": "main",
|
||||||
|
"configurations": {
|
||||||
|
"main": {
|
||||||
|
"flags": "--env.commonjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dependsOn": ["^build"]
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"prepare": {
|
"prepare": {
|
||||||
|
|||||||
@@ -252,11 +252,6 @@ global.Experimental = function (target: Object, key?: string | symbol, descripto
|
|||||||
};
|
};
|
||||||
const modules: Map<string, { moduleId: string; loader: ModuleLoader }> = new Map<string, { moduleId: string; loader: ModuleLoader }>();
|
const modules: Map<string, { moduleId: string; loader: ModuleLoader }> = new Map<string, { moduleId: string; loader: ModuleLoader }>();
|
||||||
|
|
||||||
async function dynamicResolveModule(name: string) {
|
|
||||||
const result = await import(name);
|
|
||||||
return result.default || result;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`globals/index, __COMMONJS__:`, __COMMONJS__);
|
console.log(`globals/index, __COMMONJS__:`, __COMMONJS__);
|
||||||
global.loadModule = function loadModule(name: string): any {
|
global.loadModule = function loadModule(name: string): any {
|
||||||
const moduleInfo = modules.get(name);
|
const moduleInfo = modules.get(name);
|
||||||
@@ -391,10 +386,5 @@ if (!global.NativeScriptHasPolyfilled) {
|
|||||||
// installPolyfills('abortcontroller', ['AbortController', 'AbortSignal']);
|
// installPolyfills('abortcontroller', ['AbortController', 'AbortSignal']);
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const jest: any;
|
|
||||||
function isTestingEnv() {
|
|
||||||
return typeof jest !== 'undefined' || global.__UNIT_TEST__;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ensure the Application instance is initialized before any other module imports it.
|
// ensure the Application instance is initialized before any other module imports it.
|
||||||
import '../application';
|
import '../application';
|
||||||
|
|||||||
Reference in New Issue
Block a user