libs config

This commit is contained in:
Yuri Kuznetsov
2021-06-23 15:45:51 +03:00
parent e6c869a438
commit 9559e9fff3
7 changed files with 101 additions and 37 deletions
+18 -13
View File
@@ -17,20 +17,25 @@
<link rel="shortcut icon" href="{{basePath}}{{faviconPath}}" type="image/x-icon">
<script type="text/javascript">
$(() => {
Espo.loader.cacheTimestamp = {{loaderCacheTimestamp}};
Espo.loader.setCacheTimestamp({{loaderCacheTimestamp}});
Espo.loader.setBasePath('{{basePath}}');
require('{{appClientClassName}}', App => {
new App({
id: '{{applicationId}}',
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
basePath: '{{basePath}}',
apiUrl: '{{apiUrl}}',
ajaxTimeout: {{ajaxTimeout}},
}, app => {
{{runScript}}
});
});
Espo.loader
.loadLibsConfig('{{libsConfigPath}}')
.then(() =>
require('{{appClientClassName}}', App => {
new App({
id: '{{applicationId}}',
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
basePath: '{{basePath}}',
apiUrl: '{{apiUrl}}',
ajaxTimeout: {{ajaxTimeout}},
}, app => {
{{runScript}}
});
})
);
});
</script>
</head>