Split js chunks
All checks were successful
Deploy Spot / deploy (push) Successful in 34s

This commit is contained in:
2026-05-23 00:12:15 +02:00
parent 8a590aa2fc
commit e0fc62df84
5 changed files with 78 additions and 10 deletions

View File

@@ -44,6 +44,8 @@ class Spot extends Main
const MAIN_PAGE = 'index';
const DIST_FOLDER = '../dist/';
private Project $oProject;
private Media $oMedia;
private User $oUser;
@@ -188,13 +190,24 @@ class Spot extends Main
),
self::MAIN_PAGE,
array(
'language' => $this->oLang->getLanguage(),
'filepath_js' => self::addTimestampToFilePath('app.js'),
'tags' => [
'language' => $this->oLang->getLanguage()
],
'instances' => [
'entrypoint' => $this->getAppEntryPoints()
]
),
$asPages
);
}
private function getAppEntryPoints() {
return array_map(
function($sFileName) {return ['filename' => self::addTimestampToFilePath($sFileName)];},
json_decode(file_get_contents(self::DIST_FOLDER.'entrypoints.json'), true)['entrypoints']['app']
);
}
public function checkUserClearance($iClearance) {
return $this->oUser->checkUserClearance($iClearance);
}