Why We Use RequireJS on Magento 2Magento2 not reading my requirejs-config.jsWhy does Magento 2 use RequireJS `map` instead of `path`Magento 2: requirejs-config.js in themes?How to load custom JS and dependencies using RequireJSHow can I add custom js file and js file in magento 2 using requirejsMagento + RequireJS - How to use non-AMD custom javascript with jQuery?Magento 2: Global variable doesn't work with RequireJSAdd js with RequireJS on product listings page only - without adding or changing phtmlwhat is requirejs-config.js in Magento2?Why do we use bin/magento setup:di:compile

Does this Wild Magic result affect the sorcerer or just other creatures?

How do I set an alias to a terminal line?

What does the hyphen "-" mean in "tar xzf -"?

Has there been any indication at all that further negotiation between the UK and EU is possible?

JSON selector class in Python

"How can you guarantee that you won't change/quit job after just couple of months?" How to respond?

Unusual mail headers, evidence of an attempted attack. Have I been pwned?

What does "play with your toy’s toys" mean?

Why tighten down in a criss-cross pattern?

Loss of power when I remove item from the outlet

Java TreeMap.floorKey() equivalent for std::map

How does a blind passenger not die, if driver becomes unconscious

What can I do with a research project that is my university’s intellectual property?

Helping ease my back pain when I'm studying 13 hours everyday, even weekends

What size of powerbank will I need to power a phone and DSLR for 2 weeks?

Methodology: Writing unit tests for another developer

Is there a term for the belief that "if it's legal, it's moral"?

Employer wants to use my work email account after I quit

How to make clear to people I don't want to answer their "Where are you from?" question?

How to model a twisted cylinder like this

Can White Castle?

Cut the gold chain

What's currently blocking the construction of the wall between Mexico and the US?

Greeting with "Ho"



Why We Use RequireJS on Magento 2


Magento2 not reading my requirejs-config.jsWhy does Magento 2 use RequireJS `map` instead of `path`Magento 2: requirejs-config.js in themes?How to load custom JS and dependencies using RequireJSHow can I add custom js file and js file in magento 2 using requirejsMagento + RequireJS - How to use non-AMD custom javascript with jQuery?Magento 2: Global variable doesn't work with RequireJSAdd js with RequireJS on product listings page only - without adding or changing phtmlwhat is requirejs-config.js in Magento2?Why do we use bin/magento setup:di:compile






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Please tell me why we use requirejs and require-configjs files and purpose of these two files on magento 2.Complete Details if Possible.



enter image description here










share|improve this question




























    0















    Please tell me why we use requirejs and require-configjs files and purpose of these two files on magento 2.Complete Details if Possible.



    enter image description here










    share|improve this question
























      0












      0








      0








      Please tell me why we use requirejs and require-configjs files and purpose of these two files on magento 2.Complete Details if Possible.



      enter image description here










      share|improve this question














      Please tell me why we use requirejs and require-configjs files and purpose of these two files on magento 2.Complete Details if Possible.



      enter image description here







      magento2 javascript requirejs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 13 at 13:54









      Muhammad AhmedMuhammad Ahmed

      988




      988




















          1 Answer
          1






          active

          oldest

          votes


















          1














          As per the dev docs:




          To address the problem of slow page load, we exclude JavaScript from the page headers and we added the ability to use the RequireJS library.



          RequireJS improves the perceived page load time because it allows JavaScript to load in the background; in particular, because it enables asynchronous JavaScript loading.




          It is also used to track/inject dependencies to make managing Javascript easier. If you've worked on Magento 1 you'll remember the huuuuuge JS files that were difficult to maintain.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278267%2fwhy-we-use-requirejs-on-magento-2%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            As per the dev docs:




            To address the problem of slow page load, we exclude JavaScript from the page headers and we added the ability to use the RequireJS library.



            RequireJS improves the perceived page load time because it allows JavaScript to load in the background; in particular, because it enables asynchronous JavaScript loading.




            It is also used to track/inject dependencies to make managing Javascript easier. If you've worked on Magento 1 you'll remember the huuuuuge JS files that were difficult to maintain.






            share|improve this answer



























              1














              As per the dev docs:




              To address the problem of slow page load, we exclude JavaScript from the page headers and we added the ability to use the RequireJS library.



              RequireJS improves the perceived page load time because it allows JavaScript to load in the background; in particular, because it enables asynchronous JavaScript loading.




              It is also used to track/inject dependencies to make managing Javascript easier. If you've worked on Magento 1 you'll remember the huuuuuge JS files that were difficult to maintain.






              share|improve this answer

























                1












                1








                1







                As per the dev docs:




                To address the problem of slow page load, we exclude JavaScript from the page headers and we added the ability to use the RequireJS library.



                RequireJS improves the perceived page load time because it allows JavaScript to load in the background; in particular, because it enables asynchronous JavaScript loading.




                It is also used to track/inject dependencies to make managing Javascript easier. If you've worked on Magento 1 you'll remember the huuuuuge JS files that were difficult to maintain.






                share|improve this answer













                As per the dev docs:




                To address the problem of slow page load, we exclude JavaScript from the page headers and we added the ability to use the RequireJS library.



                RequireJS improves the perceived page load time because it allows JavaScript to load in the background; in particular, because it enables asynchronous JavaScript loading.




                It is also used to track/inject dependencies to make managing Javascript easier. If you've worked on Magento 1 you'll remember the huuuuuge JS files that were difficult to maintain.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 13 at 14:47









                Ben CrookBen Crook

                9,7652580




                9,7652580



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278267%2fwhy-we-use-requirejs-on-magento-2%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form