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