mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
Can't require non console-log when __snapshot generating (#4325)
This commit is contained in:
@ -115,6 +115,7 @@ export function enable(mode: InstrumentationMode = "counters") {
|
||||
}[mode];
|
||||
}
|
||||
|
||||
if (!(<any>global).__snapshot) {
|
||||
try {
|
||||
const appConfig = global.require("~/package.json");
|
||||
if (appConfig && appConfig.profiling) {
|
||||
@ -125,6 +126,7 @@ try {
|
||||
} catch(e) {
|
||||
console.log("Profiling startup failed to figure out defaults from package.json, error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
export function disable() {
|
||||
profileFunctionFactory = undefined;
|
||||
|
Reference in New Issue
Block a user