onCreateApp()
hook
Environment: server, client.
Implemented by: vike-vue
.
You need
vike-vue
to be able to useonCreateApp()
.
The onCreateApp()
hook is called right after the
Vue app is created, giving you the opportunity to extend it,
typically for registering a Vue plugin.
There are two app instances: one for rendering the
+Page.vue
component, and a second one for rendering the+Head.vue
components. You can usepageContext.isRenderingHead
for applyingonCreateApp()
only for rendering the+Page.vue
component.
Examples
See vike-vue
> /examples/full/pages/+onCreateApp.ts