Home > database >  Vue project with or without Babel?
Vue project with or without Babel?

Time:09-22

I am using Vue CLI to create a Vue 2.0 project and one of the options is using Babel. I understand Babel is a transpiler but what exactly does it do? I created a project with it and another without it and I don't see the difference so what exactly is the pro/con of it ? I can't see offhand what it is doing.

CodePudding user response:

You are correct. Babel is a transpiler. It transpiles your JavaScript code to one or more taget browsers, that does not support the lastest fetures. You will not see any difference, if using a newer browser.

Babal usually only makes sense if you need to support older browsers, like IE 11 or browsers from before 2017.

  • Related