I feel confused with these folders:
core-js/core
core-js/es6
core-js/fn
core-js/library
core-js/modules
I want to require only needed module, but which folder should I choose ? What is the difference ? It is so confusing without relative descriptions.
modules folder contains implementations of polyfills without dependencies. You can use it only if you understand what are you doing - it's enough dangerous.core, es5, es6, es7 and web contains features related only those namespaces. For example, core-js/es6/promise will add a Promise polyfill, but without .finally and .try methods. In the next major core-js version, es5, es6and es7 will be replaced to es for stable ECMAScript features and esnext for ECMAScript proposals.fn folder contains entry points for each feature, it's the better way for most cases. For example, core-js/fn/promise will add a Promise polyfill with all required features and dependencies.library folder contains copies of all of the previous folders, but they work without global namespace pollution. For example, core-js/library/fn/promise returns Promise polyfill, but without creating global Promise variable.
Most helpful comment
modulesfolder contains implementations of polyfills without dependencies. You can use it only if you understand what are you doing - it's enough dangerous.core,es5,es6,es7andwebcontains features related only those namespaces. For example,core-js/es6/promisewill add aPromisepolyfill, but without.finallyand.trymethods. In the next majorcore-jsversion,es5,es6andes7will be replaced toesfor stable ECMAScript features andesnextfor ECMAScript proposals.fnfolder contains entry points for each feature, it's the better way for most cases. For example,core-js/fn/promisewill add aPromisepolyfill with all required features and dependencies.libraryfolder contains copies of all of the previous folders, but they work without global namespace pollution. For example,core-js/library/fn/promisereturnsPromisepolyfill, but without creating globalPromisevariable.