File tree 1 file changed +13
-7
lines changed
app/code/Magento/RequireJs/Block/Html/Head 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,10 @@ public function __construct(
58
58
*/
59
59
protected function _prepareLayout ()
60
60
{
61
+ $ after = RequireJsConfig::REQUIRE_JS_FILE_NAME ;
61
62
$ requireJsConfig = $ this ->fileManager ->createRequireJsConfigAsset ();
62
63
$ assetCollection = $ this ->pageConfig ->getAssetCollection ();
63
64
64
- $ assetCollection ->insert (
65
- $ requireJsConfig ->getFilePath (),
66
- $ requireJsConfig ,
67
- RequireJsConfig::REQUIRE_JS_FILE_NAME
68
- );
69
-
70
65
if ($ this ->bundleConfig ->isBundlingJsFiles ()) {
71
66
$ bundleAssets = $ this ->fileManager ->createBundleJsPool ();
72
67
$ staticAsset = $ this ->fileManager ->createStaticJsAsset ();
@@ -81,10 +76,21 @@ protected function _prepareLayout()
81
76
RequireJsConfig::REQUIRE_JS_FILE_NAME
82
77
);
83
78
}
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 ();
85
85
}
86
86
}
87
87
88
+ $ assetCollection ->insert (
89
+ $ requireJsConfig ->getFilePath (),
90
+ $ requireJsConfig ,
91
+ $ after
92
+ );
93
+
88
94
return parent ::_prepareLayout ();
89
95
}
90
96
You can’t perform that action at this time.
0 commit comments