#89431Require JS config packages gets overruled
Description
Trying to add a ‘highcharts’ module to require js, i use the method ‘addRequireJsConfiguration’ of the ‘PageRender’ class.
Since the packages array is numerically indexed all existing entries at the same position get overridden by my definition. Or the other way around: an extension loaded after mine will override my packages if it adds packages itself.
here is my configuration:
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->addRequireJsConfiguration([
'packages' => [[
'name' => 'highcharts',
'main' => 'highcharts'
]],
'paths' => [
'highcharts' => 'https://code.highcharts.com'
],
]);