Skip to content

Commit 867c699

Browse files
authored
docs(babel): update babelHelpers description (#397)
* Update babelHelpers option section default description Update `babelHelpers` options documentation, which was confusing (and likely incorrect): it reported that `babelHelpers: 'inline'` is the default, when the header of the section says that the default is `'bundled'`. Please verify that this documentation change reflects the actual behavior. * docs(babel): based on PR feedback, make a second attempt at clarifying the babelHelpers default description. * docs(babel): based on PR feedback, make a third attempt at clarifying the babelHelpers default description.
1 parent 04743f6 commit 867c699

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/babel/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ Default: `'bundled'`
9090

9191
It is recommended to configure this option explicitly (even if with its default value) so an informed decision is taken on how those babel helpers are inserted into the code.
9292

93-
We recommend to follow those guidelines for each possible value:
93+
We recommend to follow these guidelines to determine the most appropriate value for your project:
9494

95-
- `'runtime'` - you should use it especially when building libraries with rollup. It has to be used in combination with `@babel/plugin-transform-runtime` and you should also specify `@babel/runtime` as dependency of your package (don't forget to tell rollup to treat it as your external dependency when bundling for `cjs` & `es` formats).
96-
- `'bundled'` - you should use it if you want your resulting bundle to contain those helpers (at most one copy of each). Useful especially if you bundle an application code.
97-
- `'external'` - use it only if you know what you are doing. It will reference helpers on **global** `babelHelpers` object. Used in combination with `@babel/plugin-external-helpers`.
98-
- `'inline'` - this is not recommended. Helpers will be inserted in each file using them. This can cause serious code duplication (this is the default Babel behaviour).
95+
- `'runtime'` - you should use this especially when building libraries with Rollup. It has to be used in combination with `@babel/plugin-transform-runtime` and you should also specify `@babel/runtime` as dependency of your package (don't forget to tell Rollup to treat it as your external dependency when bundling for `cjs` & `es` formats).
96+
- `'bundled'` - you should use this if you want your resulting bundle to contain those helpers (at most one copy of each). Useful especially if you bundle an application code.
97+
- `'external'` - use this only if you know what you are doing. It will reference helpers on **global** `babelHelpers` object. Used in combination with `@babel/plugin-external-helpers`.
98+
- `'inline'` - this is not recommended. Helpers will be inserted in each file using this option. This can cause serious code duplication. This is the default Babel behavior as Babel operates on isolated files - however, as Rollup is a bundler and is project-aware (and therefore likely operating across multiple input files), the default of this plugin is `"bundled"`.
9999

100100
### `skipPreflightCheck`
101101

0 commit comments

Comments
 (0)