@@ -780,6 +780,11 @@ class Encore {
780780 * // automatically import polyfills where they
781781 * // are needed
782782 * useBuiltIns: 'usage'
783+ *
784+ * // if you set useBuiltIns you also have to add
785+ * // core-js to your project using Yarn or npm and
786+ * // inform Babel of the version it will use.
787+ * corejs: 3
783788 * });
784789 *
785790 * Supported options:
@@ -793,14 +798,18 @@ class Encore {
793798 * If set that option will include the given Node modules to
794799 * the files that are processed by Babel. Cannot be used if
795800 * the "exclude" option is also set.
796- * * {'usage'|'entry'|false} useBuiltIns (default='entry' )
801+ * * {'usage'|'entry'|false} useBuiltIns (default=false )
797802 * Set the "useBuiltIns" option of @babel/preset-env that changes
798803 * how it handles polyfills (https://babeljs.io/docs/en/babel-preset-env#usebuiltins)
799- * Using it with 'entry' will require you to import @babel/polyfill
804+ * Using it with 'entry' will require you to import core-js
800805 * once in your whole app and will result in that import being replaced
801806 * by individual polyfills. Using it with 'usage' will try to
802807 * automatically detect which polyfills are needed for each file and
803808 * add them accordingly.
809+ * * {number|string} corejs (default=not set)
810+ * Set the "corejs" option of @babel/preset-env.
811+ * It should contain the version of core-js you added to your project
812+ * if useBuiltIns isn't set to false.
804813 *
805814 * @param {function } callback
806815 * @param {object } encoreOptions
0 commit comments