Magento 2 : Requirejs, Calling a js file universally in magento 2 / javaScript, RequireJs / By Saphal Calling a js in all the pages of Magento 2, use below code in your requirejs-config.js: HTMLvar config = { deps: [ 'JS_NAME' ], paths: { JS_NAME: 'Vendor_ModuleName/js/JS_FILE', } };