I'm building a frontend app boilerplate to set up projects that use ES6 and Fetch with Gulp and Babel + Browserify for modules.
I know how to import both babel-polyfill and core-js (in case I don't want the Generator Runtime) but they are both 80 to 90 kilobytes minified in comparison to something like lodash or jQuery (less than 40 Kb minified).
My question is, how can I use ES6 import syntax (I'm using browserify) to only import the things I want from core-js instead of throwing them all together?
For example, say I import lodash so I have ES5 array features covered but I also want ES6 Promises, Map and Object (which includes assign, freeze, etc) without importing the whole { ES5, Es6, Es7 } set of modules.
For example, how would I only import all modules from the /es6 folder?
import * from 'core-js/es6'
?? I have no idea, really; please help!
It'd be lovely to do something like
import { Promise, Map, WeakMap } from 'core-js/es6'
as well.