[mobile] revert changes for addon path

This commit is contained in:
Maxim Kadushkin 2021-08-02 21:31:49 +03:00
parent 1690881eeb
commit 736453ce15
2 changed files with 11 additions and 11 deletions

View file

@ -526,10 +526,10 @@ module.exports = function(grunt) {
cmd: function() {
const editor = packageFile.name == 'presentationeditor' ? 'slide' :
packageFile.name == 'spreadsheeteditor' ? 'cell' : 'word';
// return `npm run deploy-${editor}`;
return `npm run deploy-${editor}`;
const addon_path = `${packageFile.mobile.js.reactjs && !!packageFile.mobile.js.reactjs.features ? `ADDON_ENV=${packageFile.mobile.js.reactjs.features}` : ''}`;
return `npx cross-env TARGET_EDITOR=${editor} NODE_ENV=production ${addon_path} node ./build/build.js`;
// const addon_path = `${packageFile.mobile.js.reactjs && !!packageFile.mobile.js.reactjs.features ? `ADDON_ENV=${packageFile.mobile.js.reactjs.features}` : ''}`;
// return `npx cross-env TARGET_EDITOR=${editor} NODE_ENV=production ${addon_path} node ./build/build.js`;
},
},
webpack_install: {

View file

@ -78,10 +78,10 @@ module.exports = {
resolvePath('node_modules/dom7'),
resolvePath('node_modules/ssr-window'),
resolvePath(`${addonPath}`),
//resolvePath('../../../web-apps-mobile/word'),
//resolvePath('../../../web-apps-mobile/slide'),
//resolvePath('../../../web-apps-mobile/cell')
//resolvePath(`${addonPath}`),
resolvePath('../../../web-apps-mobile/word'),
resolvePath('../../../web-apps-mobile/slide'),
resolvePath('../../../web-apps-mobile/cell')
],
},
@ -220,10 +220,10 @@ 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 => fs.existsSync(`${addonPath}/patch.jsx`) ?
resource.request = `../../../${addonPath}/patch.jsx` : resource
resource => 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
),
],
};