Caleb Porzio 9/7/2019

Using Babel Without The Build (Inline JS FTW!!!)

Read Original

This article details a method for using modern JavaScript (like ES6 arrow functions) in inline <script> tags while maintaining compatibility with older browsers like IE 11. It demonstrates loading Babel Standalone and Babel Polyfill from a CDN and using `type="text/babel"` to transpile code on the fly, avoiding a complex build setup. It also notes performance considerations and best practices for placement.

Using Babel Without The Build (Inline JS FTW!!!)

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week