Proper way to use Babel in production The Next CEO of Stack OverflowWhat is the most efficient way to deep clone an object in JavaScript?What is the best way to add options to a select from as a JS object with jQuery?What is the best way to detect a mobile device in jQuery?Babel 6 regeneratorRuntime is not definedhow do I use babel 6 (es7) plugins like the (es6) polyfill?Babel and Browserify / Webpack confusionES6 import using at ('@') sign in path in a vue.js project using WebpackES6 to ES5: Babel's implementation of class extensionConfused about useBuiltIns option of @babel/preset-env (using Browserslist Integration)babel-minify vs terser (instead uglify-js)

Can I equip Skullclamp on a creature I am sacrificing?

Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?

How to use tikz in fbox?

Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Is the concept of a "numerable" fiber bundle really useful or an empty generalization?

When did Lisp start using symbols for arithmetic?

Too much space between section and text in a twocolumn document

Can a single photon have an energy density?

Visit to the USA with ESTA approved before trip to Iran

Why is there a PLL in CPU?

WOW air has ceased operation, can I get my tickets refunded?

Should I tutor a student who I know has cheated on their homework?

How easy is it to start Magic from scratch?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Fastest way to shutdown Ubuntu Mate 18.10

If the heap is initialized for security, then why is the stack uninitialized?

Trouble understanding the speech of overseas colleagues

Why does C# sound extremely flat when saxophone is tuned to G?

What is meant by a M next to a roman numeral?

Why do remote companies require working in the US?

Inappropriate reference requests from Journal reviewers

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

How to make a software documentation "officially" citable?



Proper way to use Babel in production



The Next CEO of Stack OverflowWhat is the most efficient way to deep clone an object in JavaScript?What is the best way to add options to a select from as a JS object with jQuery?What is the best way to detect a mobile device in jQuery?Babel 6 regeneratorRuntime is not definedhow do I use babel 6 (es7) plugins like the (es6) polyfill?Babel and Browserify / Webpack confusionES6 import using at ('@') sign in path in a vue.js project using WebpackES6 to ES5: Babel's implementation of class extensionConfused about useBuiltIns option of @babel/preset-env (using Browserslist Integration)babel-minify vs terser (instead uglify-js)










1















I want to use babel to transform modern javascript to plain old ES5 JavaScript.



I used the first tool on babel's website "Prototyping-In the browser" and on the website it says




"... if you are working on a production site you should be
precompiling your scripts server-side"




after using that prototyping tool, the browser's console says




"... Be sure to precompile your scripts for production"




as a result I checked the second tool "Babel built-ins CLI" and used it with the help of node.js to generate the compatible JS scripts, the website doesn't mention the same message about production as the first tool I used, although the resulting code is almost the same.



My question is can I grab the resulting JS scripts from the "Babel CLI" tool and
just replace the current ones? is that enough for production? Are they considered precompiled?



Note that I am not using node.js, it is just a javascript application.



Searching around the web got me many results about precompiling JS such as using webpack and Browserify and now I am lost about the state of the files generated from Babel, are they ready to be used or should they be precompiled.



I am posting this question out of confusion, so my apologies if it sounds stupid or not reasonable.










share|improve this question


























    1















    I want to use babel to transform modern javascript to plain old ES5 JavaScript.



    I used the first tool on babel's website "Prototyping-In the browser" and on the website it says




    "... if you are working on a production site you should be
    precompiling your scripts server-side"




    after using that prototyping tool, the browser's console says




    "... Be sure to precompile your scripts for production"




    as a result I checked the second tool "Babel built-ins CLI" and used it with the help of node.js to generate the compatible JS scripts, the website doesn't mention the same message about production as the first tool I used, although the resulting code is almost the same.



    My question is can I grab the resulting JS scripts from the "Babel CLI" tool and
    just replace the current ones? is that enough for production? Are they considered precompiled?



    Note that I am not using node.js, it is just a javascript application.



    Searching around the web got me many results about precompiling JS such as using webpack and Browserify and now I am lost about the state of the files generated from Babel, are they ready to be used or should they be precompiled.



    I am posting this question out of confusion, so my apologies if it sounds stupid or not reasonable.










    share|improve this question
























      1












      1








      1








      I want to use babel to transform modern javascript to plain old ES5 JavaScript.



      I used the first tool on babel's website "Prototyping-In the browser" and on the website it says




      "... if you are working on a production site you should be
      precompiling your scripts server-side"




      after using that prototyping tool, the browser's console says




      "... Be sure to precompile your scripts for production"




      as a result I checked the second tool "Babel built-ins CLI" and used it with the help of node.js to generate the compatible JS scripts, the website doesn't mention the same message about production as the first tool I used, although the resulting code is almost the same.



      My question is can I grab the resulting JS scripts from the "Babel CLI" tool and
      just replace the current ones? is that enough for production? Are they considered precompiled?



      Note that I am not using node.js, it is just a javascript application.



      Searching around the web got me many results about precompiling JS such as using webpack and Browserify and now I am lost about the state of the files generated from Babel, are they ready to be used or should they be precompiled.



      I am posting this question out of confusion, so my apologies if it sounds stupid or not reasonable.










      share|improve this question














      I want to use babel to transform modern javascript to plain old ES5 JavaScript.



      I used the first tool on babel's website "Prototyping-In the browser" and on the website it says




      "... if you are working on a production site you should be
      precompiling your scripts server-side"




      after using that prototyping tool, the browser's console says




      "... Be sure to precompile your scripts for production"




      as a result I checked the second tool "Babel built-ins CLI" and used it with the help of node.js to generate the compatible JS scripts, the website doesn't mention the same message about production as the first tool I used, although the resulting code is almost the same.



      My question is can I grab the resulting JS scripts from the "Babel CLI" tool and
      just replace the current ones? is that enough for production? Are they considered precompiled?



      Note that I am not using node.js, it is just a javascript application.



      Searching around the web got me many results about precompiling JS such as using webpack and Browserify and now I am lost about the state of the files generated from Babel, are they ready to be used or should they be precompiled.



      I am posting this question out of confusion, so my apologies if it sounds stupid or not reasonable.







      javascript babeljs babel






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 16:13









      E. MeinlE. Meinl

      213




      213






















          1 Answer
          1






          active

          oldest

          votes


















          0















          Can I grab the resulting JS scripts from the "Babel CLI" tool and just replace the current ones? Is that enough for production?




          Yes, that would work. However you will want to avoid this manual step of copying scripts into a web tool for every little change you make during development. It's better to work with an automated build flow.




          Searching around the web got me many results about precompiling JS such as using webpack and Browserify




          Babel only transpiles new syntax to old syntax. Webpack and Browserify also bundle modules into a single script that can be loaded into a webpage.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f55284812%2fproper-way-to-use-babel-in-production%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









            0















            Can I grab the resulting JS scripts from the "Babel CLI" tool and just replace the current ones? Is that enough for production?




            Yes, that would work. However you will want to avoid this manual step of copying scripts into a web tool for every little change you make during development. It's better to work with an automated build flow.




            Searching around the web got me many results about precompiling JS such as using webpack and Browserify




            Babel only transpiles new syntax to old syntax. Webpack and Browserify also bundle modules into a single script that can be loaded into a webpage.






            share|improve this answer



























              0















              Can I grab the resulting JS scripts from the "Babel CLI" tool and just replace the current ones? Is that enough for production?




              Yes, that would work. However you will want to avoid this manual step of copying scripts into a web tool for every little change you make during development. It's better to work with an automated build flow.




              Searching around the web got me many results about precompiling JS such as using webpack and Browserify




              Babel only transpiles new syntax to old syntax. Webpack and Browserify also bundle modules into a single script that can be loaded into a webpage.






              share|improve this answer

























                0












                0








                0








                Can I grab the resulting JS scripts from the "Babel CLI" tool and just replace the current ones? Is that enough for production?




                Yes, that would work. However you will want to avoid this manual step of copying scripts into a web tool for every little change you make during development. It's better to work with an automated build flow.




                Searching around the web got me many results about precompiling JS such as using webpack and Browserify




                Babel only transpiles new syntax to old syntax. Webpack and Browserify also bundle modules into a single script that can be loaded into a webpage.






                share|improve this answer














                Can I grab the resulting JS scripts from the "Babel CLI" tool and just replace the current ones? Is that enough for production?




                Yes, that would work. However you will want to avoid this manual step of copying scripts into a web tool for every little change you make during development. It's better to work with an automated build flow.




                Searching around the web got me many results about precompiling JS such as using webpack and Browserify




                Babel only transpiles new syntax to old syntax. Webpack and Browserify also bundle modules into a single script that can be loaded into a webpage.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 21 at 18:26









                BergiBergi

                379k63578913




                379k63578913





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f55284812%2fproper-way-to-use-babel-in-production%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript