``PageRenderer:: addRequireJsConfiguration`` does now load RequireJS
in the backend, as this method is called before ``loadRequireJs()``
otherwise, colliding with how ``loadRequireJs()`` handles RequireJS.
This is not done in frontend, as the output could get broken.
Resolves: #75353
Releases: master, 7.6
Change-Id: I7a1140036dcbf9ab869b361c40fedc3813a887d3
Reviewed-on: https://review.typo3.org/47548
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
*/
public function addRequireJsConfiguration(array $configuration)
{
+ if (TYPO3_MODE === 'BE') {
+ // Load RequireJS in backend context at first. Doing this in FE could break the output
+ $this->loadRequireJs();
+ }
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($this->requireJsConfig, $configuration);
}