-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
update docs for bugfixes removal #3129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for babel-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for babel ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| - `include` and `exclude` respect renamed package names ([#15576](https://github.com/babel/babel/pull/15576)) | ||
|
|
||
| **Migration**: If `includes` or `excludes` contain any plugins mentioned in the [Packages Renames section](./v8-migration.md#renamed-packages), change it to the new name. For example, | ||
| **Migration**: If `include` or `exclude` contain any plugins mentioned in the [Packages Renames section](./v8-migration.md#renamed-packages), change it to the new name. For example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously I made typos in the include and exclude options, they have also been fixed in this PR.
| **Migration**: You will probably be fine with the new behaviour as Babel now tries to compile the broken syntax to the closest _non-broken modern syntax_ supported by your target browsers. | ||
|
|
||
| - Removed syntax plugins can not be used in `includes` and `excludes` ([#15810](https://github.com/babel/babel/pull/15810)) | ||
| If anyhow you want to restore the Babel 7 behaviour for debug purpose, you can specify the [`exclude` option](./preset-env.md#exclude): `{ exclude: [/bugfix/] }` to explicitly exclude the bugfixes plugins. Note that doing so will bloat the output as Babel has to compile features to older targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will disabling the bugfix cause the output to become larger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for example, given the input
var a;
a?.bwith target chrome: 90,
the output with { bugfixes: true } is
var a;
a?.b;whereas the output with { bugfixes: false } is
var a;
a === null || a === void 0 ? void 0 : a.b;| **Migration**: You will probably be fine with the new behaviour as Babel now tries to compile the broken syntax to the closest _non-broken modern syntax_ supported by your target browsers. | ||
|
|
||
| - Removed syntax plugins can not be used in `includes` and `excludes` ([#15810](https://github.com/babel/babel/pull/15810)) | ||
| If anyhow you want to restore the Babel 7 behaviour for debug purpose, you can specify the [`exclude` option](./preset-env.md#exclude): `{ exclude: [/bugfix/] }` to explicitly exclude the bugfixes plugins. Note that doing so will bloat the output as Babel has to compile features to older targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| If anyhow you want to restore the Babel 7 behaviour for debug purpose, you can specify the [`exclude` option](./preset-env.md#exclude): `{ exclude: [/bugfix/] }` to explicitly exclude the bugfixes plugins. Note that doing so will bloat the output as Babel has to compile features to older targets. | |
| If anyhow you want to restore the Babel 7 behaviour for debug purpose, you can specify the [`exclude` option](./preset-env.md#exclude): `{ exclude: [/bugfix/] }` to explicitly exclude the bugfixes plugins. Note that doing so will bloat the output as Babel has to compile general available language features even if they might not be affected by the browser quirk. |
Does the revised wording clarify why the output might be bloated?
Docs PR for babel/babel#17078.
Closes #3044
Closes #3132