feat:add sourceUrl so that the script can be debuged
This commit is contained in:
parent
bde3315b2d
commit
0786c12e5e
@ -34,7 +34,8 @@ return __module.exports;},this,[{exports:{}}])])`
|
|||||||
}
|
}
|
||||||
|
|
||||||
function packageCreateContext(contextId: string, content: string) {
|
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}
|
${content}
|
||||||
},doric.jsObtainContext("${contextId}"),[undefined,doric.jsObtainContext("${contextId}"),doric.jsObtainEntry("${contextId}"),doric.__require__,{},doricSetTimeout,doricSetInterval,doricClearTimeout,doricClearInterval])`
|
},doric.jsObtainContext("${contextId}"),[undefined,doric.jsObtainContext("${contextId}"),doric.jsObtainEntry("${contextId}"),doric.__require__,{},doricSetTimeout,doricSetInterval,doricClearTimeout,doricClearInterval])`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user