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

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

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?