Decoupling of layout definitions
With the whole new spirit of loosely coupling the Magento 2 code base, maybe a good look can be taken at the layout definitions and its dependencies. For example, opening Magento/Backend/view/adminhtml/layout/default.xml reveals the following definitions which can be moved:
<link src="Magento_Rule::rules.js"/> <!--Magento_Rule can take care of this-->
The following can be moved to Magento_RequireJS:
<link src="requirejs/require.js"/>
<link src="mage/requirejs/resolver.js"/>
</head>
[...]
<block name="require.js" class="Magento\Backend\Block\Page\RequireJs" template="Magento_Backend::page/js/require_js.phtml" />
[...]
<referenceContainer name="after.body.start">
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
More in after.body.start:
<block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/> <!--Magento_Translation can take care of this-->
And so forth.
Thank you for reporting this issue! We will have to look at this and get back to you once we have an answer.
Good catch.. Thank you, for the valid suggestion. We are going to resolve this within one of the following sprints.
Internal ticket: MAGETWO-30486
Thank you for your submission.
We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.
Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).
We are closing this GitHub ticket and have moved your request to the new forum.