[DE mobile] load private functions patch
This commit is contained in:
parent
eb5a3b438f
commit
09102047c1
|
@ -13,6 +13,8 @@ import {
|
||||||
ViewCommentsController
|
ViewCommentsController
|
||||||
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
||||||
|
|
||||||
|
import patch from '../lib/patch'
|
||||||
|
|
||||||
@inject(
|
@inject(
|
||||||
"storeAppOptions",
|
"storeAppOptions",
|
||||||
"storeDocumentSettings",
|
"storeDocumentSettings",
|
||||||
|
@ -56,6 +58,7 @@ class MainController extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadConfig = data => {
|
const loadConfig = data => {
|
||||||
|
patch.isSupportEditFeature();
|
||||||
console.log('load config');
|
console.log('load config');
|
||||||
|
|
||||||
this.editorConfig = Object.assign({}, this.editorConfig, data.config);
|
this.editorConfig = Object.assign({}, this.editorConfig, data.config);
|
||||||
|
|
10
apps/documenteditor/mobile/src/lib/patch.jsx
Normal file
10
apps/documenteditor/mobile/src/lib/patch.jsx
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
const patch = () => {
|
||||||
|
return null
|
||||||
|
};
|
||||||
|
|
||||||
|
patch.isSupportEditFeature = () => {
|
||||||
|
return false
|
||||||
|
};
|
||||||
|
|
||||||
|
export default patch;
|
|
@ -7,6 +7,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ const env = process.env.NODE_ENV || 'development';
|
||||||
const target = process.env.TARGET || 'web';
|
const target = process.env.TARGET || 'web';
|
||||||
const editor = process.env.TARGET_EDITOR == 'cell' ? 'spreadsheeteditor' :
|
const editor = process.env.TARGET_EDITOR == 'cell' ? 'spreadsheeteditor' :
|
||||||
process.env.TARGET_EDITOR == 'slide' ? 'presentationeditor' : 'documenteditor';
|
process.env.TARGET_EDITOR == 'slide' ? 'presentationeditor' : 'documenteditor';
|
||||||
|
const targetPatch = process.env.TARGET_EDITOR || 'word';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: env,
|
mode: env,
|
||||||
|
@ -206,5 +208,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
|
||||||
|
),
|
||||||
],
|
],
|
||||||
};
|
};
|
Loading…
Reference in a new issue