Skip to content

Commit 567c9a8

Browse files
docs: mention accessing createApp from a CDN build (#774)
1 parent 4b551fb commit 567c9a8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/guide/migration/global-api.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ import { createApp } from 'vue'
6565
const app = createApp({})
6666
```
6767

68+
If you're using a [CDN](/guide/installation.html#cdn) build of Vue then `createApp` is exposed via the global `Vue` object:
69+
70+
```js
71+
const { createApp } = Vue
72+
73+
const app = createApp({})
74+
```
75+
6876
An app instance exposes a subset of the current global APIs. The rule of thumb is _any APIs that globally mutate Vue's behavior are now moved to the app instance_. Here is a table of the current global APIs and their corresponding instance APIs:
6977

7078
| 2.x Global API | 3.x Instance API (`app`) |
@@ -198,7 +206,7 @@ export default {
198206
}
199207
```
200208

201-
Using `provide` is especially useful when writing a plugin, as an alternative to `globalProperties`.
209+
Using `provide` is especially useful when writing a plugin, as an alternative to `globalProperties`.
202210

203211
## Share Configurations Among Apps
204212

0 commit comments

Comments
 (0)