Magento requirejs-config file provides an alias for the custom js file declared inside map or path object.
You can use an alias anywhere inside a template or other Require JS file in the Magento system.
Create a requirejs-config.js file in your module, Continue reading “How to give alias to the require js file with requirejs-config JS magento 2?”
Magento 2 template supports require JS declaration using X-MAGENTO-INIT. You can define require js with the Magento PHTML template file.
Require js loaded as AMD (Asynchronous module definition) based approach.