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)
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
add a comment |
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
add a comment |
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
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
javascript babeljs babel
asked Mar 21 at 16:13
E. MeinlE. Meinl
213
213
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 21 at 18:26
BergiBergi
379k63578913
379k63578913
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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