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 cross-browser 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 core-js 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 - Wrap-up
Webpack Basics Walkthrough:
• Creating and Understan...
Repository for reference:
github.com/Jimmydalecleveland...
Follow Jimmy Cleveland's doings:
twitter: / jimmydcleveland
blog: blog.jimmydc.com/
#javascript #webpack #babel #polyfill #crossbrowser
Негізгі бет How to get polyfills with Babel 7 and Webpack
Пікірлер: 108