From 09f9cbf3df5a9f670ff5bbd75fa71f946470d40e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 10 Aug 2022 09:53:57 +0300 Subject: [PATCH] sourceUrl --- client/src/loader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/loader.js b/client/src/loader.js index bb27ef4b3a..e10809d6c8 100644 --- a/client/src/loader.js +++ b/client/src/loader.js @@ -159,8 +159,9 @@ * @private * @param {string} script * @param {string} name + * @param {string} path */ - _execute: function (script, name) { + _execute: function (script, name, path) { /** @var {?string} */ let module = null; @@ -176,6 +177,8 @@ noStrictMode = true; } + script += `\n//# sourceURL=/${path}`; + // For bc. if (module && module !== 'crm') { noStrictMode = true; @@ -548,7 +551,7 @@ } if (dataType === 'script') { - this._execute(cached, name); + this._execute(cached, name, dto.path); } if (type === 'class') { @@ -635,7 +638,7 @@ } if (dataType === 'script') { - this._execute(response, name); + this._execute(response, name, dto.path); } let data;