Skip to content
Discussion options

You must be logged in to vote

Integration succeeded. Just need the following:

// https://vike.dev/onCreateApp 
// pages/+onCreateApp.ts
// Environment: server & client

export { onCreateApp }

import { ID_INJECTION_KEY, ZINDEX_INJECTION_KEY } from 'element-plus'
import type { PageContext } from 'vike/types'

function onCreateApp(pageContext: PageContext) {
  const app = pageContext.app
  if (!app) {
    throw new Error('[onCreateApp] pageContext.app is missing')
  }

  app
    .provide(ID_INJECTION_KEY, {
      prefix: 1024,
      current: 0,
    })
    .provide(ZINDEX_INJECTION_KEY, { current: 0 })
}
// https://vike.dev/bodyHtmlEnd 
// pages/+bodyHtmlBegin.ts
import type { PageContextServer } from 'vike/types'

expo…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@brillout
Comment options

Comment options

You must be logged in to vote
3 replies
@brillout
Comment options

@inschrift-spruch-raum
Comment options

@brillout
Comment options

Answer selected by inschrift-spruch-raum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants