bundle fix

This commit is contained in:
Yuri Kuznetsov
2021-07-06 15:06:25 +03:00
parent 36d6a72317
commit 47cd8b71f7
5 changed files with 81 additions and 51 deletions

View File

@@ -4,6 +4,7 @@
],
"developerModeScriptList": [
"client/src/loader.js",
"client/src/loader-init-libs.js",
"client/src/utils.js",
"client/src/exceptions.js"
],

View File

@@ -1,34 +0,0 @@
{
"espo": {
"exportsTo": "window",
"exportsAs": "Espo"
},
"jquery": {
"exportsTo": "window",
"exportsAs": "$"
},
"backbone": {
"exportsTo": "window",
"exportsAs": "Backbone"
},
"bullbone": {
"exportsTo": "window",
"exportsAs": "Bull"
},
"handlebars": {
"exportsTo": "window",
"exportsAs": "Handlebars"
},
"underscore": {
"exportsTo": "window",
"exportsAs": "_"
},
"marked": {
"exportsTo": "window",
"exportsAs": "marked"
},
"dompurify": {
"exportsTo": "window",
"exportsAs": "DOMPurify"
}
}

View File

@@ -0,0 +1,64 @@
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2021 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
* Website: https://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.loader.addLibsConfig(
{
"espo": {
"exportsTo": "window",
"exportsAs": "Espo"
},
"jquery": {
"exportsTo": "window",
"exportsAs": "$"
},
"backbone": {
"exportsTo": "window",
"exportsAs": "Backbone"
},
"bullbone": {
"exportsTo": "window",
"exportsAs": "Bull"
},
"handlebars": {
"exportsTo": "window",
"exportsAs": "Handlebars"
},
"underscore": {
"exportsTo": "window",
"exportsAs": "_"
},
"marked": {
"exportsTo": "window",
"exportsAs": "marked"
},
"dompurify": {
"exportsTo": "window",
"exportsAs": "DOMPurify"
}
}
);

View File

@@ -3,6 +3,7 @@
"client/src/namespace.js",
"client/src/exceptions.js",
"client/src/loader.js",
"client/src/loader-init-libs.js",
"client/src/utils.js",
"client/src/acl.js",
@@ -33,6 +34,8 @@
"client/src/view-helper.js",
"client/src/page-title.js",
"client/src/broadcast-channel.js",
"client/src/web-socket-manager.js",
"client/src/number.js",
"client/src/app.js"
]

View File

@@ -21,23 +21,19 @@
Espo.loader.setBasePath('{{basePath}}');
Espo.loader.setInternalModuleList({{internalModuleList}});
Espo.loader
.loadLibsConfig('{{libsConfigPath}}')
.then(() =>
require('{{appClientClassName}}', App => {
new App({
id: '{{applicationId}}',
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
basePath: '{{basePath}}',
apiUrl: '{{apiUrl}}',
ajaxTimeout: {{ajaxTimeout}},
internalModuleList: {{internalModuleList}},
}, app => {
{{runScript}}
});
})
);
require('{{appClientClassName}}', App => {
new App({
id: '{{applicationId}}',
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
basePath: '{{basePath}}',
apiUrl: '{{apiUrl}}',
ajaxTimeout: {{ajaxTimeout}},
internalModuleList: {{internalModuleList}},
}, app => {
{{runScript}}
});
});
});
</script>
</head>