Magento RequireJS & JavaScript Components
Create RequireJS Aliases with map and paths
Free Preview
The "*" in the "map" prop makes the alias available to all JavaScript components.
The format for aliases is: "alias": "<Vendor_Module>/js/filename"

The area can either be "base", "frontend", or "adminhtml".

maps to ->

Paths can be used for non-AMD JavaScript modules & external files, just be sure
to not include the ".js" extension as this is automatically appended.
var config = {
    "map": {
        "*": {
            "fadeInElement": "Macademy_JsFun/js/fade-in-element"
    "paths": {
        "vue": ""
// After defining an alias, it can then be used when requiring dependencies.
require(['jquery', 'fadeInElement'], function($, fadeInElement) {
    'use strict';

    $(function() {
Want to learn more?

Visit to learn much more about Magento, Laravel, PHP, Javascript, & Docker. logo