YouTube magic that brings views, likes and suibscribers
Get Free YouTube Subscribers, Views and Likes

How to get polyfills with Babel 7 and Webpack

Follow
Swashbuckling with Code

Polyfills can be a little confusing to figure out why and when you need them, and how to accomplish that. Babel has docs covering it, but there is a lot to unpack there, which was quite confusing to me when I first encountered this world. I hope to distill a little bit of that magic in this video and give you a modern, Babel 7, solution to having crossbrowser JavaScript method support in a Webpack 5 project.

00:00 What we'll cover
01:41 Quick project overview
03:10 First bundle build errors in IE 11
04:17 Adding a browserslist file
06:50 Adding method that requires polyfill
08:01 Adding corejs to get polyfills
10:40 Getting async await working
15:20 Babel 'useBuiltIns' with 'entry'
19:16 Deprecated @babel/polyfill package docs
20:08 Cheat code: 'usage' value for 'useBuiltIns'
24:12 Wrapup

Webpack Basics Walkthrough:
   • Creating and Understanding a Basic We...  

Repository for reference:
https://github.com/Jimmydalecleveland...

Follow Jimmy Cleveland's doings:
twitter:   / jimmydcleveland  
blog: https://blog.jimmydc.com/

#javascript #webpack #babel #polyfill #crossbrowser

posted by smskahr