docs(babel): update babelHelpers default description#397
Merged
Andarist merged 3 commits intorollup:masterfrom May 21, 2020
Merged
docs(babel): update babelHelpers default description#397Andarist merged 3 commits intorollup:masterfrom
Andarist merged 3 commits intorollup:masterfrom
Conversation
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.
Member
|
The existing description is correct. It refers to "inline" being Babel's default behavior - not |
|
Perhaps a sentence stressing explicitly that plugin-babel changes Babel's default? |
…g the babelHelpers default description.
Contributor
Author
|
@Andarist thanks for your clarification - I still feel as though the current text is hard to understand and not fully clear, so I've made a second attempt to improve this. |
Andarist
reviewed
May 20, 2020
packages/babel/README.md
Outdated
| - `'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. | ||
| - `'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`. | ||
| - `'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). | ||
| - `'inline'` - this is not recommended. Helpers will be inserted in each file using them. This can cause serious code duplication. **(for reference, this is the default behaviour of Babel, but it is overridden by the `babelHelpers` value of this plugin: to either your own explicit selection, otherwise the default value of `'bundled'` will be used)** |
Member
There was a problem hiding this comment.
Suggested change
| - `'inline'` - this is not recommended. Helpers will be inserted in each file using them. This can cause serious code duplication. **(for reference, this is the default behaviour of Babel, but it is overridden by the `babelHelpers` value of this plugin: to either your own explicit selection, otherwise the default value of `'bundled'` will be used)** | |
| - `'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 behavior as Babel operates on isolated files, as Rollup is a bundler and is project-aware the default of this plugin is `"bundled"`. |
How about this one?
Contributor
Author
… the babelHelpers default description.
Member
|
@dannya thanks! |
LarsDenBakker
pushed a commit
to LarsDenBakker/plugins
that referenced
this pull request
Sep 12, 2020
* 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update
babelHelpersoptions documentation, which was confusing (and likely incorrect): it reported thatbabelHelpers: '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.
Rollup Plugin Name:
{name}This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description