Skip to content

Commit f4311ed

Browse files
Update deprecated app.config.isCustomElement (vuejs#1307)
`app.config.isCustomElement` is deprecated and should be replaced with `app.config.compilerOptions.isCustomElement`
1 parent d026fc2 commit f4311ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/migration/custom-elements-interop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ Vue.config.ignoredElements = ['plastic-button']
5252
]
5353
```
5454

55-
- If using on-the-fly template compilation, pass it via `app.config.isCustomElement`:
55+
- If using on-the-fly template compilation, pass it via `app.config.compilerOptions.isCustomElement`:
5656

5757
```js
5858
const app = Vue.createApp({})
59-
app.config.isCustomElement = tag => tag === 'plastic-button'
59+
app.config.compilerOptions.isCustomElement = tag => tag === 'plastic-button'
6060
```
6161

6262
It's important to note the runtime config only affects runtime template compilation - it won't affect pre-compiled templates.
@@ -125,6 +125,6 @@ With the behavior change of `is`, a `vue:` prefix is now required to resolve the
125125
126126
## Migration Strategy
127127
128-
- Replace `config.ignoredElements` with either `vue-loader`'s `compilerOptions` (with the build step) or `app.config.isCustomElement` (with on-the-fly template compilation)
128+
- Replace `config.ignoredElements` with either `vue-loader`'s `compilerOptions` (with the build step) or `app.config.compilerOptions.isCustomElement` (with on-the-fly template compilation)
129129

130130
- Change all non-`<component>` tags with `is` usage to `<component is="...">` (for SFC templates) or prefix it with `vue:` (for in-DOM templates).

0 commit comments

Comments
 (0)