Bug #98635
closedbe.pageRenderer includeJavaScriptModules should take precedence over includeRequireJsModules
0%
Description
If you want to support both TYPO3 v11 and v12 and want to prevent trigger warnings you need to duplicate Fluid templates to only use the loading method:
.. code-block:: html
:caption: Fluid template for TYPO3 v12 and above
<f:be.pageRenderer
includeJavaScriptModules="{
0: '@vendor/my-extension/my-example.js'
}"
/>
.. code-block:: html
:caption: Fluid template for TYPO3 v11 and below
<f:be.pageRenderer
includeRequireJsModules="{
0: '@vendor/my-extension/my-example.js'
}"
/>
Fluid does not feature a version switch out-of-the-box. So this would have to be done in TypoScript.
I would suggest that if a certain flag is set (i.e. `prefereES6`) `includeRequireJsModules` is ignored if `includeJavaScriptModules` is set.
Updated by Georg Ringer 5 months ago
- Status changed from New to Closed
hey lina,
I am closing this issue as there is a simple solution for that: load the parts you need in the controller. PageRenderer
is a singleton and can be instantiated in controller just fine.
hope this is fine for you