From 2b5ba6049f964982f9894203ef5015f53dff67ab Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 22 Jun 2023 16:58:48 +0300 Subject: [PATCH] transpiled custom module support --- client/src/loader.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/client/src/loader.js b/client/src/loader.js index ab8f3c5365..c4ed08e67d 100644 --- a/client/src/loader.js +++ b/client/src/loader.js @@ -236,11 +236,18 @@ return 'client/custom/src/' + namePart + '.js'; } - if (this._transpiledModuleList.includes(mod)) { - return `client/lib/transpiled/modules/${mod}/src/${namePart}.js`; + const transpiled = this._transpiledModuleList.includes(mod); + const internal = this._isModuleInternal(mod); + + if (transpiled && internal) { + if (internal) { + return `client/lib/transpiled/modules/${mod}/src/${namePart}.js`; + } + + return `client/custom/modules/${mod}/lib/transpiled/src/${namePart}.js`; } - if (this._isModuleInternal(mod)) { + if (internal) { return 'client/modules/' + mod + '/src/' + namePart + '.js'; }