http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692014-02-02T11:20:36ZTYPO3 ForgeTYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2019902014-02-02T11:20:36ZDaniel Siepmanncoding@daniel-siepmann.de
<ul><li><strong>Parent task</strong> set to <i>#55575</i></li><li><strong>Is Regression</strong> set to <i>No</i></li></ul><p>`</p> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2073892014-03-10T16:31:08ZDaniel Siepmanncoding@daniel-siepmann.de
<ul></ul><p>The only thing I can implement at the moment is to remove the TYPO3 vender for external extensions. But I don't have any clue how to add the vendor for JS Files as it just exists inside PHP Files.</p>
<p>IF someone has an idea code it, or answer, so I can get into it.</p> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2675122015-07-19T19:50:27ZBenni Mackbenni@typo3.org
<ul><li><strong>Assignee</strong> set to <i>Benni Mack</i></li><li><strong>Target version</strong> set to <i>7.4 (Backend)</i></li><li><strong>Sprint Focus</strong> set to <i>Stabilization Sprint</i></li></ul> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2681872015-07-23T11:51:39ZMathias Brodalambrodala@pagemachine.de
<ul></ul><p>You can manually add your prefix with the <code>PageRenderer</code> hook <code>render-preProcess</code> like this:</p>
<pre>
$pageRenderer->addRequireJsConfiguration([
'paths' => [
'Vendor/Package' => PathUtility::getRelativePath(PATH_typo3, GeneralUtility::getFileAbsFileName('EXT:package/Resources/Public/JavaScript/')),
],
]);
</pre> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2686982015-07-27T20:20:26ZMarkus Kleinmarkus.klein@typo3.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Rejected</i></li><li><strong>Assignee</strong> deleted (<del><i>Benni Mack</i></del>)</li><li><strong>Target version</strong> deleted (<del><i>7.4 (Backend)</i></del>)</li><li><strong>Complexity</strong> changed from <i>medium</i> to <i>hard</i></li><li><strong>Sprint Focus</strong> deleted (<del><i>Stabilization Sprint</i></del>)</li></ul><p>This is still private API of Core. To add you own modules you need to do it like this:</p>
<pre>
$fullJsPath = 'EXT:' . $this->extKey . '/Resources/Public/JavaScript/';
$fullJsPath = GeneralUtility::getFileAbsFileName($fullJsPath);
$fullJsPath = PathUtility::getRelativePath(PATH_site, $fullJsPath);
$fullJsPath = $tsfe->absRefPrefix . rtrim($fullJsPath, '/');
$pageRenderer->addRequireJsConfiguration([
'paths' => [
'Reelworx/MyExt' => $fullJsPath
]
]);
$pageRenderer->loadRequireJsModule('Reelworx/MyExt/somemodule');
</pre>
<p>Making this API really versatile is a load of work and for sure no bug!</p> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2687562015-07-28T12:41:59ZBenni Mackbenni@typo3.org
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Task</i></li><li><strong>Status</strong> changed from <i>Rejected</i> to <i>Accepted</i></li><li><strong>Target version</strong> set to <i>7.5</i></li></ul><p>ok. but we should "do it right" for 7.5 then.</p> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2777322015-09-24T20:00:43ZBenni Mackbenni@typo3.org
<ul><li><strong>Assignee</strong> set to <i>Benni Mack</i></li><li><strong>Target version</strong> changed from <i>7.5</i> to <i>7 LTS</i></li></ul> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2819332015-10-16T12:54:31ZFrank Näglerfrank.naegler@typo3.org
<ul></ul><p><a class="user active user-mention" href="http://forge.typo3.org/users/320">@Benni Mack</a> I think the solution from Markus is a good example how to do it.<br />I think we need no change here, the default namespace is TYPO3\CMS\EXTKEY... If I need or want another prefix, I can register my own.<br />We don't know the VENDOR prefix, I have no idea how to resolve this VENDOR automatic.</p> TYPO3 Core - Task #48383: RequireJS does not consider correct namespace prefixhttp://forge.typo3.org/issues/48383?journal_id=2838022015-10-30T01:30:47ZBenni Mackbenni@typo3.org
<ul><li><strong>Status</strong> changed from <i>Accepted</i> to <i>Closed</i></li></ul><p>Is fine for now, I think that's actually quite OK.</p>