mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
6c0dd8400b
Previously, Turbopack treated `_app` and Pages router pages as completely separate. So using code both in `_app` and `pages/foo.tsx` would lead to a lot of duplicated code to be loaded at runtime. But in reality, `_app` is always loaded for Pages, so we can thread the availability info and skip chunking modules that were already loaded by `_app`. Recreation of https://github.com/vercel/next.js/pull/97549 Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
13 lines
278 B
JavaScript
13 lines
278 B
JavaScript
const sideEffect = (arg) => {
|
|
if (!sideEffect.callArguments) {
|
|
sideEffect.callArguments = []
|
|
}
|
|
sideEffect.callArguments.push(arg)
|
|
|
|
return sideEffect.callArguments
|
|
}
|
|
|
|
globalThis.__appPageSharedModuleMarker = 'APP_PAGE_SHARED_MODULE_MARKER'
|
|
|
|
export default sideEffect
|