[mobile] added checking of extra addons for build
This commit is contained in:
parent
b5d131193a
commit
ba344265b3
|
@ -555,6 +555,7 @@ module.exports = function(grunt) {
|
||||||
webpack_app_build: {
|
webpack_app_build: {
|
||||||
options: {
|
options: {
|
||||||
cwd: '../vendor/framework7-react',
|
cwd: '../vendor/framework7-react',
|
||||||
|
env: {...process.env, ...{addon: grunt.option('addon')}},
|
||||||
},
|
},
|
||||||
cmd: function() {
|
cmd: function() {
|
||||||
const editor = packageFile.name == 'presentationeditor' ? 'slide' :
|
const editor = packageFile.name == 'presentationeditor' ? 'slide' :
|
||||||
|
|
|
@ -231,8 +231,9 @@ module.exports = {
|
||||||
}),
|
}),
|
||||||
new webpack.NormalModuleReplacementPlugin(
|
new webpack.NormalModuleReplacementPlugin(
|
||||||
/\.{2}\/lib\/patch/,
|
/\.{2}\/lib\/patch/,
|
||||||
resource => fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
|
resource => (env == 'development' || /web-apps-mobile/.test(process.env.addon)) &&
|
||||||
resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : 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 => fs.existsSync(`${addonPath}/patch.jsx`) ?
|
||||||
//resource.request = `../../../${addonPath}/patch.jsx` : resource
|
//resource.request = `../../../${addonPath}/patch.jsx` : resource
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue