What is the difference between polyfill and transpiler?

后端 未结 5 889
离开以前
离开以前 2021-02-01 02:37

What is the difference between a polyfill and transpiler?

I often read the same term used in similar context.

5条回答
  •  醉话见心
    2021-02-01 02:54

    Polyfilling is like copying a feature so that one can use it. In polyfilling, one write code to get a similar functionality as provided in other JS version.

    Transpilling convert code which has new syntax using transpiler so that it can be used in browsers having older Js versions.

提交回复
热议问题