From 0786c12e5e2997d79d8f9495a1535236f0b62199 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Sun, 22 Dec 2019 02:12:23 +0800 Subject: [PATCH] feat:add sourceUrl so that the script can be debuged --- doric-h5/src/DoricDriver.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doric-h5/src/DoricDriver.ts b/doric-h5/src/DoricDriver.ts index 0e01fc4d..e690293f 100644 --- a/doric-h5/src/DoricDriver.ts +++ b/doric-h5/src/DoricDriver.ts @@ -34,7 +34,8 @@ return __module.exports;},this,[{exports:{}}])])` } function packageCreateContext(contextId: string, content: string) { - return `Reflect.apply(function(doric,context,Entry,require,exports,setTimeout,setInterval,clearTimeout,clearInterval){ + return `//@ sourceURL=contextId_${contextId}.js +Reflect.apply(function(doric,context,Entry,require,exports,setTimeout,setInterval,clearTimeout,clearInterval){ ${content} },doric.jsObtainContext("${contextId}"),[undefined,doric.jsObtainContext("${contextId}"),doric.jsObtainEntry("${contextId}"),doric.__require__,{},doricSetTimeout,doricSetInterval,doricClearTimeout,doricClearInterval])` }