Actions
Bug #98635
closedbe.pageRenderer includeJavaScriptModules should take precedence over includeRequireJsModules
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2022-10-17
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
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.
Actions