Skip to content

Commit a66fee6

Browse files
authored
docs: update polyfill names according to core-js 3 (#5282)
1 parent 15a4d4b commit a66fee6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/guide/browser-compatibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ If one of your dependencies need polyfills, you have a few options:
1818

1919
1. **If the dependency is written in an ES version that your target environments do not support:** Add that dependency to the [`transpileDependencies`](../config/#transpiledependencies) option in `vue.config.js`. This would enable both syntax transforms and usage-based polyfill detection for that dependency.
2020

21-
2. **If the dependency ships ES5 code and explicitly lists the polyfills needed:** you can pre-include the needed polyfills using the [polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) option for `@vue/babel-preset-app`. **Note that `es6.promise` is included by default because it's very common for libs to depend on Promises.**
21+
2. **If the dependency ships ES5 code and explicitly lists the polyfills needed:** you can pre-include the needed polyfills using the [polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) option for `@vue/babel-preset-app`. **Note that `es.promise` is included by default because it's very common for libs to depend on Promises.**
2222

2323
``` js
2424
// babel.config.js
2525
module.exports = {
2626
presets: [
2727
['@vue/app', {
2828
polyfills: [
29-
'es6.promise',
30-
'es6.symbol'
29+
'es.promise',
30+
'es.symbol'
3131
]
3232
}]
3333
]

docs/ru/guide/browser-compatibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818

1919
1. **Если зависимость написана в версии ES, которую не поддерживают целевые окружения:** Добавьте эту зависимость в опцию [`transpileDependencies`](../config/#transpiledependencies) в файле `vue.config.js`. Это позволит использовать как синтаксические преобразования, так и определение полифилов для используемых возможностей для этой зависимости.
2020

21-
2. **Если зависимость предоставляет ES5 код и явно перечисляет необходимые полифилы:** вы можете предварительно включить необходимые полифилы с помощью опции [polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) для `@vue/babel-preset-app`. **Обратите внимание, что `es6.promise` добавлен по умолчанию, так как он часто необходим для библиотек, основанных на Promise.**
21+
2. **Если зависимость предоставляет ES5 код и явно перечисляет необходимые полифилы:** вы можете предварительно включить необходимые полифилы с помощью опции [polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) для `@vue/babel-preset-app`. **Обратите внимание, что `es.promise` добавлен по умолчанию, так как он часто необходим для библиотек, основанных на Promise.**
2222

2323
```js
2424
// babel.config.js
2525
module.exports = {
2626
presets: [
2727
['@vue/app', {
2828
polyfills: [
29-
'es6.promise',
30-
'es6.symbol'
29+
'es.promise',
30+
'es.symbol'
3131
]
3232
}]
3333
]

docs/zh/guide/browser-compatibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818

1919
1. **如果该依赖基于一个目标环境不支持的 ES 版本撰写:** 将其添加到 `vue.config.js` 中的 [`transpileDependencies`](../config/#transpiledependencies) 选项。这会为该依赖同时开启语法转换和根据使用情况检测 polyfill。
2020

21-
2. **如果该依赖交付了 ES5 代码并显式地列出了需要的 polyfill:** 你可以使用 `@vue/babel-preset-app`[polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) 选项预包含所需要的 polyfill。**注意 `es6.promise` 将被默认包含,因为现在的库依赖 Promise 是非常普遍的。**
21+
2. **如果该依赖交付了 ES5 代码并显式地列出了需要的 polyfill:** 你可以使用 `@vue/babel-preset-app`[polyfills](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app#polyfills) 选项预包含所需要的 polyfill。**注意 `es.promise` 将被默认包含,因为现在的库依赖 Promise 是非常普遍的。**
2222

2323
``` js
2424
// babel.config.js
2525
module.exports = {
2626
presets: [
2727
['@vue/app', {
2828
polyfills: [
29-
'es6.promise',
30-
'es6.symbol'
29+
'es.promise',
30+
'es.symbol'
3131
]
3232
}]
3333
]

packages/@vue/babel-preset-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ See [@babel/preset-env docs](https://new.babeljs.io/docs/en/next/babel-preset-en
7878

7979
### polyfills
8080

81-
- Default: `['es6.array.iterator', 'es6.promise', 'es6.object.assign', 'es7.promise.finally']`
81+
- Default: `['es.array.iterator', 'es.promise', 'es.object.assign', 'es.promise.finally']`
8282

8383
A list of [core-js](https://github.com/zloirock/core-js) polyfills to pre-include when using `useBuiltIns: 'usage'`. **These polyfills are automatically excluded if they are not needed for your target environments**.
8484

0 commit comments

Comments
 (0)