Issue Bug Closed

#89431Require JS config packages gets overruled

Kay Wienöbst 10/16/19, 13:32 updated 04/01/20, 21:14

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'
],
]);

Reviews 2