File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
app/code/Magento/RequireJs/Block/Html/Head Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,10 @@ public function __construct(
5858 */
5959 protected function _prepareLayout ()
6060 {
61+ $ after = RequireJsConfig::REQUIRE_JS_FILE_NAME ;
6162 $ requireJsConfig = $ this ->fileManager ->createRequireJsConfigAsset ();
6263 $ assetCollection = $ this ->pageConfig ->getAssetCollection ();
6364
64- $ assetCollection ->insert (
65- $ requireJsConfig ->getFilePath (),
66- $ requireJsConfig ,
67- RequireJsConfig::REQUIRE_JS_FILE_NAME
68- );
69-
7065 if ($ this ->bundleConfig ->isBundlingJsFiles ()) {
7166 $ bundleAssets = $ this ->fileManager ->createBundleJsPool ();
7267 $ staticAsset = $ this ->fileManager ->createStaticJsAsset ();
@@ -81,10 +76,21 @@ protected function _prepareLayout()
8176 RequireJsConfig::REQUIRE_JS_FILE_NAME
8277 );
8378 }
84- $ assetCollection ->insert ($ staticAsset ->getFilePath (), $ staticAsset , RequireJsConfig::CONFIG_FILE_NAME );
79+ $ assetCollection ->insert (
80+ $ staticAsset ->getFilePath (),
81+ $ staticAsset ,
82+ reset ($ bundleAssets )->getFilePath ()
83+ );
84+ $ after = $ staticAsset ->getFilePath ();
8585 }
8686 }
8787
88+ $ assetCollection ->insert (
89+ $ requireJsConfig ->getFilePath (),
90+ $ requireJsConfig ,
91+ $ after
92+ );
93+
8894 return parent ::_prepareLayout ();
8995 }
9096
You can’t perform that action at this time.
0 commit comments