rsnext/packages/next/client/app-next.js
Jiachi Liu 3618b9017e
Merge app internal chunk into main chunk for layouts (#41902)
When emitting the client components entry from server compiler, merging
app internal entry into main-app to avoid duplicated chunks like react
are generated in both sides

Related: https://github.com/vercel/next.js/issues/41870
2022-10-27 16:50:46 -07:00

9 lines
296 B
JavaScript

import { appBootstrap } from './app-bootstrap'
appBootstrap(() => {
// Include app-router and layout-router in the main chunk
require('next/dist/client/components/app-router')
require('next/dist/client/components/layout-router')
const { hydrate } = require('./app-index')
hydrate()
})