Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/code/Magento/RequireJs/Block/Html/Head/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ protected function _prepareLayout()
$after = $staticAsset->getFilePath();
}
}
$requireJsConfig = $this->fileManager->createRequireJsConfigAsset();
$assetCollection->insert(
$requireJsConfig->getFilePath(),
$requireJsConfig,
$after
);
$requireJsMixinsConfig = $this->fileManager->createRequireJsMixinsAsset();
$assetCollection->insert(
$requireJsMixinsConfig->getFilePath(),
$requireJsMixinsConfig,
$after
);
$requireJsConfig = $this->fileManager->createRequireJsConfigAsset();
$assetCollection->insert(
$requireJsConfig->getFilePath(),
$requireJsConfig,
$after
);
return parent::_prepareLayout();
}
}
6 changes: 0 additions & 6 deletions app/code/Magento/Theme/view/base/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,3 @@ var config = {
}
}
};

require(['jquery'], function ($) {
'use strict';

$.noConflict();
});
7 changes: 7 additions & 0 deletions lib/web/mage/requirejs/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,11 @@ require([

return queueItem;
};

require(['jquery'], function ($) {
'use strict';

$.noConflict();
});

});
34 changes: 8 additions & 26 deletions lib/web/requirejs/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,6 @@ var requirejs, require, define;
defQueueMap: {},
Module: Module,
makeModuleMap: makeModuleMap,
nextTick: req.nextTick,
onError: onError,

/**
Expand Down Expand Up @@ -1463,25 +1462,18 @@ var requirejs, require, define;
//Grab defines waiting in the global queue.
intakeDefines();

//Mark all the dependencies as needing to be loaded.
context.nextTick(function () {
//Some defines could have been added since the
//require call, collect them.
intakeDefines();
requireMod = getModule(makeModuleMap(null, relMap));

requireMod = getModule(makeModuleMap(null, relMap));
//Store if map config should be applied to this require
//call for dependencies.
requireMod.skipMap = options.skipMap;

//Store if map config should be applied to this require
//call for dependencies.
requireMod.skipMap = options.skipMap;

requireMod.init(deps, callback, errback, {
enabled: true
});

checkLoaded();
requireMod.init(deps, callback, errback, {
enabled: true
});

checkLoaded();

return localRequire;
}

Expand Down Expand Up @@ -1832,16 +1824,6 @@ var requirejs, require, define;
return req(config);
};

/**
* Execute something after the current tick
* of the event loop. Override for other envs
* that have a better solution than setTimeout.
* @param {Function} fn function to execute later.
*/
req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
setTimeout(fn, 4);
} : function (fn) { fn(); };

/**
* Export require as a global, but only if it does not already exist.
*/
Expand Down