[mobile] added checking of extra addons for build

This commit is contained in:
Maxim Kadushkin
2022-01-15 15:33:12 +03:00
parent b5d131193a
commit ba344265b3
2 changed files with 4 additions and 2 deletions

View File

@ -231,8 +231,9 @@ module.exports = {
}),
new webpack.NormalModuleReplacementPlugin(
/\.{2}\/lib\/patch/,
resource => fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource
resource => (env == 'development' || /web-apps-mobile/.test(process.env.addon)) &&
fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource
//resource => fs.existsSync(`${addonPath}/patch.jsx`) ?
//resource.request = `../../../${addonPath}/patch.jsx` : resource
),