babel-polyfill
can make us happy to use es6
, es7
API
, but often only part of these API
are used in the project, and a babel-polyfill
is compressed with a size of nearly 100k, which is really scary.
for example, I want Promise
to be used in the project, and only part of the Promise
code is loaded when packaged, not the whole polyfill
.
how can I get babel-polyfill
to load on demand?