After reading the article Removing Babel's Stage Presets by babel
, I still not fully understand how to add a proposal from, for example, stage-3
(flatMap) to .babelrc
.
As far as I understand, because flatMap
can be written in ES5, then I need a polyfill and not a plugin. I installed @babel/polyfill
under --save-dev but the browser still tells me that this method doesn't exist. I guess that @babel/polyfill
doesn't cover experimental features.