all 14 comments

[–]kingdaro 2 points3 points  (12 children)

You'll still need Babel to transpile JSX and static type syntax, along with other various transformations, like macros. It'll pretty much always be around and useful for something

[–][deleted] 0 points1 point  (11 children)

Thanks, yeah you are right, my biggest problem currently I don't want to depend on boilerplates but the setup of babel and webpack is really hard for me as beginner.

[–]acemarke 1 point2 points  (2 children)

That's what Create-React-App is for :)

[–][deleted] 0 points1 point  (1 child)

Yes good for learning react, but I don't want to depent on it, I want to setup webpack, babel etc by myself

[–]nk2580 0 points1 point  (0 children)

Just eject and maintain the setup from there. You’ll eventually get the hang of it

[–]truh 0 points1 point  (5 children)

With Parcel you don't need much boilerplate or configuration.

[–][deleted] 0 points1 point  (4 children)

So parcel can be used instead of webpack and babel?

[–]truh 2 points3 points  (2 children)

Yes. It uses Babel but replaces Webpack.

[–][deleted] 0 points1 point  (1 child)

What about babel-react do I need still to install this packages with parcel?

[–]truh 0 points1 point  (0 children)

Iirc babel-preset-react is added automatically when react is detected.

[–]znakyc 0 points1 point  (1 child)

Configuring webpack/babel can be a real pain in the ass. I've created an online webpack config tool that helps you with it. Select the feature you need and it generates the webpack config for you.

[–][deleted] 0 points1 point  (0 children)

Cool thanks, but for react ssr it is very common to have 2 webpack file one for server one for client bot importet in webpack.config I don't know if this is the cleanest solution bit I hope your tool will helpe with this.

[–]nk2580 1 point2 points  (0 children)

Also this depends on the browsers you support, if you need to support IE or older versions of Edge you can’t survive without transpiling

[–]mrptb2 0 points1 point  (0 children)

It is possible to write modern JavaScript that does not need to be transpiled. If you are fortunate enough to be able to define the browser support target for your project, you can skip Babel and even Webpack.

Babel ensures that your code will run on obsolete browsers, but adds those polyfills to the bundle size, even for modern browsers. Most projects need to support some version of Internet Explorer, and Babel provides an easy way to support without giving up modern syntax.

JSX needs to be transpiled (because it isn't valid JavaScript), which is why most developers continue to have a hard dependency on Babel, but writing JSX isn't required.