Nuxt/packages/nuxt3/src/app/entry.ts
Marsel Shayhin (Phoenix Apps) 04b6466d37
fix(nuxt3): change entry to use asynchronous import (#2223)
Co-authored-by: Marsel Shayhin <phoenix.apps@yahoo.com>
2021-12-23 23:20:54 +01:00

12 lines
274 B
TypeScript

import { CreateOptions } from '#app'
const entry = process.server
? (ctx?: CreateOptions['ssrContext']) => import('#app/bootstrap').then(m => m.default(ctx))
: () => import('#app/bootstrap').then(m => m.default)
if (process.client) {
entry()
}
export default entry