Comments (4)
If I understood it right, 6to5 doesn't require loading any JavaScript in your project (browser or node) to operate. It generates pure ES5 code which can run in environments that do not support ES6 yet.
For example this ES6 code will get converted to the following code that can run in Node and browser without requiring --harmony
in Node or ES6 flags enabled in the browser
ES6
let arr = [1, 2, 3].map((item) => item * item);
generated ES5
(function () {
var arr = [
1,
2,
3
].map(function (item) {
return item * item;
});
}());
from babel.
@mohsen1 If it’s “that easy” to transpile ES6 to ES5, why does Traceur require a 75KB runtime to do the “same thing”. That’s what I’m trying to understand. I’m assuming there’s some advanced stuff in those 75KB that 6to5 is lacking, hence my inquiry.
from babel.
Traceur includes a mess of polyfills and emulates modules with a loader, store etc so it has to include a runtime because of these requirements. You can see an example of the fully built runtime here.
from babel.
Looks like, it’s mostly polyfills. Ok then.
from babel.
Related Issues (20)
- [Bug]: Babel transforms a decorated async private method into a generator function HOT 1
- [Bug]: Generator functions cannot be converted using only @babel/plugin-transform-runtime HOT 15
- [Bug]: failed to transform Class fields with `declare` modifier in TypeScript HOT 16
- [Discussion] Remove `flow` support from `@babel/parser` HOT 10
- [Bug]: should parse `type A = import("mod", { with: { type: "json" }});` HOT 1
- [Bug]: @babel/preset-env not including plugins for shippedProposals HOT 4
- [Bug]: A question about the isTSX option HOT 3
- Support proposal-explicit-resource-management DisposableStack HOT 3
- Параметры командной строки, поддерживаемые пакетами Self-Extractor - Windows Client | Microsoft Learn HOT 2
- [Bug]: decorator on symbol-keyed member throws error at evaluation time HOT 2
- [Bug]: do-expressions plugin throws "Couldn't find a Program" in Babel 8 HOT 2
- [Bug]: Element decorator referencing both `this` and local private field is not compiled properly HOT 1
- Spread syntax on Uint8Array incorrectly transpiled to ES5 HOT 5
- [Bug]: The source code is indented to 4 Spaces, babel translated into 2 HOT 4
- [Bug]: BABEL_PARSE_ERROR regarding duplicate function definitions HOT 4
- [Bug]: Invalid Slack link in README file HOT 3
- [babel 8] Cleanup `@babel/plugin-transform-runtime` options HOT 9
- [Bug]: @babel/plugin-proposal-decorators helper functions are not reused HOT 2
- Consider warning when `transform-runtime`'s `version` is not speficied
- Remove `privateFieldsAsProperties` support in Babel 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel.