People like to use the latest ECMAScript features which may not yet be supported by all browsers. So Babel transforms the original JavaScript to a subset that is well supported by most browsers and polyfills the rest.
It needs to be emphasized that Babel itself does not become part of the application - it is just a build tool. However the code it generates tends to be larger as more succinct modern JavaScript features are replaced with more verbose transforms and all the necessary polyfills.
You are not explaining why you are asking this question; given that create-react-app handles everything for you, it shouldn't be a concern.
Top comments (3)
Babel, JSX, and Build Steps
Which highlights why Babel is used in the majority of cases:
but like this:
Why you donβt need Babel
It needs to be emphasized that Babel itself does not become part of the application - it is just a build tool. However the code it generates tends to be larger as more succinct modern JavaScript features are replaced with more verbose transforms and all the necessary polyfills.
You are not explaining why you are asking this question; given that create-react-app handles everything for you, it shouldn't be a concern.
So the question sounds like an XY problem.
Also given what you need Preact is often enough.
No
yes to reduce the burden of writing html in javascript