Skip to content

Commit 620c04d

Browse files
committed
feat: update affected pages per code review
1 parent 02ae9e6 commit 620c04d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/guide/migration/global-api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ An app instance exposes a subset of the Vue 2 global APIs. The rule of thumb is
7979
| -------------------------- | ----------------------------------------------------------------------------------------------- |
8080
| Vue.config | app.config |
8181
| Vue.config.productionTip | _removed_ ([see below](#config-productiontip-removed)) |
82-
| Vue.config.ignoredElements | app.config.isCustomElement ([see below](#config-ignoredelements-is-now-config-iscustomelement)) |
82+
| Vue.config.ignoredElements | app.config.compilerOptions.isCustomElement ([see below](#config-ignoredelements-is-now-config-compileroptions-iscustomelement)) |
8383
| Vue.component | app.component |
8484
| Vue.directive | app.directive |
8585
| Vue.mixin | app.mixin |
@@ -94,7 +94,7 @@ In Vue 3.x, the "use production build" tip will only show up when using the "dev
9494

9595
For ES modules builds, since they are used with bundlers, and in most cases a CLI or boilerplate would have configured the production env properly, this tip will no longer show up.
9696

97-
### `config.ignoredElements` Is Now `config.isCustomElement`
97+
### `config.ignoredElements` Is Now `config.compilerOptions.isCustomElement`
9898

9999
This config option was introduced with the intention to support native custom elements, so the renaming better conveys what it does. The new option also expects a function which provides more flexibility than the old string / RegExp approach:
100100

@@ -104,14 +104,14 @@ Vue.config.ignoredElements = ['my-el', /^ion-/]
104104

105105
// after
106106
const app = createApp({})
107-
app.config.isCustomElement = tag => tag.startsWith('ion-')
107+
app.config.compilerOptions.isCustomElement = tag => tag.startsWith('ion-')
108108
```
109109

110110
::: tip Important
111111

112112
In Vue 3, the check of whether an element is a component or not has been moved to the template compilation phase, therefore this config option is only respected when using the runtime compiler. If you are using the runtime-only build, `isCustomElement` must be passed to `@vue/compiler-dom` in the build setup instead - for example, via the [`compilerOptions` option in vue-loader](https://vue-loader.vuejs.org/options.html#compileroptions).
113113

114-
- If `config.isCustomElement` is assigned to when using a runtime-only build, a warning will be emitted instructing the user to pass the option in the build setup instead;
114+
- If `config.compilerOptions.isCustomElement` is assigned to when using a runtime-only build, a warning will be emitted instructing the user to pass the option in the build setup instead;
115115
- This will be a new top-level option in the Vue CLI config.
116116
:::
117117

@@ -219,7 +219,7 @@ import Bar from './Bar.vue'
219219

220220
const createMyApp = options => {
221221
const app = createApp(options)
222-
app.directive('focus', /* ... */)
222+
app.directive('focus' /* ... */)
223223

224224
return app
225225
}

src/style-guide/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,8 @@ This is the default order we recommend for component options. They're split into
12681268
1. **Global Awareness** (requires knowledge beyond the component)
12691269
- `name`
12701270

1271-
2. **Template Modifiers** (changes the way templates are compiled)
1272-
- `delimiters`
1271+
2. **Template Compiler Options** (changes the way templates are compiled)
1272+
- `compilerOptions`
12731273

12741274
3. **Template Dependencies** (assets used in the template)
12751275
- `components`

0 commit comments

Comments
 (0)