mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
e45a780714
* fix(vite): don't use async entry * fix: use async entry when built * refactor: default to sync entry, with option to enable async * refactor: move to experimental.asyncEntry * Update packages/webpack/src/presets/base.ts Co-authored-by: pooya parsa <pyapar@gmail.com> * Update packages/vite/src/vite.ts Co-authored-by: pooya parsa <pyapar@gmail.com> * style: remove double space Co-authored-by: pooya parsa <pyapar@gmail.com>
12 lines
266 B
TypeScript
12 lines
266 B
TypeScript
import { CreateOptions } from '#app'
|
|
|
|
const entry = process.server
|
|
? (ctx?: CreateOptions['ssrContext']) => import('#app/entry').then(m => m.default(ctx))
|
|
: () => import('#app/entry').then(m => m.default)
|
|
|
|
if (process.client) {
|
|
entry()
|
|
}
|
|
|
|
export default entry
|