Dynamically load babel polyfill only when needed?

I watched the Advanced Webpack video. Right on the mark in the 10 minutes he said the discovery of the need Babel- Polyfill at runtime, and then loads it when you need it. I found this very interesting. I talked with him, but Twitter should not fit the format in order to fully answer my questions:

if (!feature) require("./polyBundle"); 

Was his recommendation, which I fully understand. My question is, which functions / functions do I need to look for? Do I need to enable Modernizr ? If I need to search for several functions, I have to track Babel-Polyfill ever, I update it to see if I need to add / subtract functions from the list?

+6
source share

All Articles