Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: add bundled rendering runtimes #52997

Merged
merged 126 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
4a41f2a
add bundled v
feedthejim Jul 4, 2023
afb3a5f
fix erroneous manifest manipulation
feedthejim Jul 4, 2023
0e178ae
revert lazy polyfill
feedthejim Jul 4, 2023
38a5a23
clean up require cache
feedthejim Jul 4, 2023
623fd8d
fix ci
feedthejim Jul 4, 2023
d06c4f8
misc
feedthejim Jul 6, 2023
1ebf057
fix nft missing
feedthejim Jul 6, 2023
81f6e1c
fix precompiled
feedthejim Jul 6, 2023
c88d5f4
fix
feedthejim Jul 6, 2023
1cc34d4
Merge branch 'canary' into feedthejim/next-1341-ship-experimental-opt…
feedthejim Jul 6, 2023
8374a83
fix precompiled
feedthejim Jul 6, 2023
2e0ce60
Merge branch 'canary' into feedthejim/next-1341-ship-experimental-opt…
feedthejim Jul 6, 2023
35bcbd8
update
feedthejim Jul 6, 2023
9b901a5
reverse node cache
feedthejim Jul 6, 2023
164bcb9
Merge branch 'canary' into feedthejim/next-1341-ship-experimental-opt…
feedthejim Jul 6, 2023
26e4e9d
revert vscode changes
feedthejim Jul 6, 2023
d84e084
Merge branch 'canary' into feedthejim/next-1341-ship-experimental-opt…
feedthejim Jul 10, 2023
282fd7b
add separate file
feedthejim Jul 10, 2023
a4c5484
fix wrong path
feedthejim Jul 10, 2023
b4a2e71
fix turbotrace tests
feedthejim Jul 10, 2023
3646bbb
foo
feedthejim Jul 11, 2023
1c6b273
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 11, 2023
41eee2e
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 13, 2023
f6efc18
add stuff
feedthejim Jul 13, 2023
e8b3b7c
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 14, 2023
e591156
tmp
feedthejim Jul 19, 2023
841521b
stuff
feedthejim Jul 20, 2023
fae5523
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 21, 2023
b50917f
tweaks
feedthejim Jul 21, 2023
dcdd086
revert form pol
feedthejim Jul 21, 2023
380e4c9
switch messages
feedthejim Jul 21, 2023
97f6ab1
revert changes to tracer
feedthejim Jul 21, 2023
ec9cddd
stuff
feedthejim Jul 24, 2023
e2cbeff
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 24, 2023
bd6a3d3
fix edge for app
feedthejim Jul 24, 2023
72dd5d9
fix router context
feedthejim Jul 24, 2023
32b023f
add remaining context for pages
feedthejim Jul 24, 2023
61709d6
fix runtime-config
feedthejim Jul 24, 2023
defc3cf
fix turbo
feedthejim Jul 24, 2023
38e709f
fix edge dev
feedthejim Jul 24, 2023
e2b7b5f
fix image loader
feedthejim Jul 24, 2023
f158277
fix requiring from next/router
feedthejim Jul 24, 2023
c8b5e41
fix app contexts
feedthejim Jul 24, 2023
a6eaeaa
fix precompiled
feedthejim Jul 24, 2023
b038535
fix router externals
feedthejim Jul 24, 2023
212ff0e
add other ctx
feedthejim Jul 24, 2023
4c3c7b6
support turbo
feedthejim Jul 24, 2023
2c41c43
yet another monkey patch
feedthejim Jul 25, 2023
a02418a
fix dynamic
feedthejim Jul 25, 2023
96a34e7
add type
feedthejim Jul 25, 2023
770f66c
fix access
feedthejim Jul 25, 2023
7807dda
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 28, 2023
d2d0541
revert shu's changes
feedthejim Jul 28, 2023
ff57434
add require hook to turbo
feedthejim Jul 28, 2023
00f966d
Merge branch 'canary' into feedthejim/build-profile
feedthejim Jul 31, 2023
907fc20
Merge branch 'canary' into feedthejim/build-profile
feedthejim Aug 2, 2023
5e980bc
change strategy
feedthejim Aug 3, 2023
292944b
disable monkey patching in dev
feedthejim Aug 3, 2023
112ef01
fix edge
feedthejim Aug 3, 2023
c073495
fix edge route module
feedthejim Aug 3, 2023
d76592c
rename .external to shared-runtime + add new layer for app routes
feedthejim Aug 3, 2023
1017540
fix storage
feedthejim Aug 3, 2023
db9fcec
fix types
feedthejim Aug 3, 2023
58b758e
Merge branch 'canary' into feedthejim/build-profile
feedthejim Aug 3, 2023
005c4b7
fix type
feedthejim Aug 3, 2023
94c33b8
fix types
feedthejim Aug 4, 2023
66d5d62
fix static gen
feedthejim Aug 4, 2023
e53218f
switch async storages to externals
feedthejim Aug 4, 2023
178f422
fix edge layers
feedthejim Aug 7, 2023
c6f160a
fix typings
feedthejim Aug 7, 2023
6951192
remove external test
feedthejim Aug 7, 2023
e21d0e5
upgrade test
feedthejim Aug 7, 2023
a92d17a
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Aug 7, 2023
5165ab3
fix native test
feedthejim Aug 7, 2023
5562947
fix integratin test
feedthejim Aug 7, 2023
1290ceb
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Aug 7, 2023
4de5f78
fix require logic
feedthejim Aug 7, 2023
3a7283a
fix lint
feedthejim Aug 7, 2023
85476d4
fix otel
feedthejim Aug 7, 2023
9461423
fix action test
feedthejim Aug 7, 2023
37c34bb
fix test
feedthejim Aug 7, 2023
cec0666
fix external
feedthejim Aug 7, 2023
2d6ff40
fix lint
feedthejim Aug 7, 2023
28f66a4
add rs plugin
feedthejim Aug 8, 2023
a6e9637
remove require hook from next swc
feedthejim Aug 8, 2023
416ecdf
add alias for next build
feedthejim Aug 8, 2023
744167d
cleanup tracing logic
feedthejim Aug 8, 2023
01b79f8
clean up route modules
feedthejim Aug 8, 2023
7ae65e2
cleanup webpack config
feedthejim Aug 8, 2023
0d4dbdc
cleanup entry-base
feedthejim Aug 8, 2023
d57f746
misc cleanup
feedthejim Aug 8, 2023
39753ab
add comment to require-hook
feedthejim Aug 8, 2023
3aae11f
tweak resolve
feedthejim Aug 8, 2023
29fdc96
fix compiler lint
feedthejim Aug 8, 2023
10cf5bd
Merge branch 'canary' into feedthejim/build-profile
feedthejim Aug 8, 2023
4a00515
rename externals
feedthejim Aug 8, 2023
b6e539f
fix path
feedthejim Aug 9, 2023
cc40387
cleanup
feedthejim Aug 9, 2023
f0bb4f6
fix lint
feedthejim Aug 9, 2023
1b459f1
add turbo prod bundle
feedthejim Aug 9, 2023
93956cf
Merge branch 'canary' into feedthejim/build-profile
feedthejim Aug 9, 2023
5d3480c
add require hook to turbo
feedthejim Aug 9, 2023
baa17eb
insert require hook config to pags
feedthejim Aug 9, 2023
9e5df4a
fix page server handler
feedthejim Aug 9, 2023
7b97013
Also apply the next external plugin in edge context
alexkirsz Aug 11, 2023
fa63c0a
Merge branch 'canary' into feedthejim/build-profile
feedthejim Aug 31, 2023
9f454fa
rebase artifacst
feedthejim Aug 31, 2023
c5e73b8
Merge branch 'feedthejim/build-profile' of github.com:vercel/next.js …
feedthejim Aug 31, 2023
0af3218
add test mode
feedthejim Aug 31, 2023
6f5cec1
Revert "Also apply the next external plugin in edge context"
feedthejim Aug 31, 2023
a54fce6
fix lint
feedthejim Aug 31, 2023
4dbb38c
fix webpack dev server
feedthejim Sep 1, 2023
be83d0a
remove image-optimizer
feedthejim Sep 1, 2023
c13175c
fix require hook (tmp)
feedthejim Sep 1, 2023
c6dc9aa
try removing the stylex-jsx ref
feedthejim Sep 1, 2023
d956d47
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Sep 1, 2023
831cce7
Revert "Fix tracing in require-hook (#53642)"
feedthejim Sep 1, 2023
11346de
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Sep 4, 2023
a633569
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Sep 4, 2023
7c599ec
fix rust transition
feedthejim Sep 5, 2023
a9303b9
fix turbopack
feedthejim Sep 5, 2023
faa9492
fix build + lint errors
feedthejim Sep 5, 2023
4f30b3f
Merge branch 'canary' into feedthejim/build-profile
feedthejim Sep 5, 2023
c121917
Merge branch 'canary' into feedthejim/build-profile
feedthejim Sep 5, 2023
6737b04
adress comments
feedthejim Sep 6, 2023
dd6cca9
Merge remote-tracking branch 'origin/canary' into feedthejim/build-pr…
feedthejim Sep 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@
},
{
"files": ["packages/**"],
"excludedFiles": ["packages/next/taskfile.js"],
"excludedFiles": [
"packages/next/taskfile*.js",
"packages/next/webpack.config.js"
],
"rules": {
"no-shadow": ["warn", { "builtinGlobals": false }],
"import/no-extraneous-dependencies": [
Expand Down
5 changes: 5 additions & 0 deletions bench/basic-app/app/api/app/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export function GET() {
return { name: 'John Doe' }
}

export const dynamic = 'force-dynamic'
12 changes: 12 additions & 0 deletions bench/basic-app/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'

export default function Layout({ children }) {
return (
<html>
<head>
<title>My App</title>
</head>
<body>{children}</body>
</html>
)
}
7 changes: 7 additions & 0 deletions bench/basic-app/app/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

export default function Page() {
return <h1>My Page</h1>
}

export const dynamic = 'force-dynamic'
5 changes: 5 additions & 0 deletions bench/basic-app/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
experimental: {
serverMinification: true,
},
}
3 changes: 3 additions & 0 deletions bench/basic-app/pages/api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
}
7 changes: 7 additions & 0 deletions bench/basic-app/pages/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default () => 'Hello World'

export function getServerSideProps() {
return {
props: {},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// the other imports
import startOperationStreamHandler from '../internal/operation-stream'

import 'next/dist/server/node-polyfill-fetch'

import { join } from 'path'
import { parse as parseUrl } from 'node:url'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import startOperationStreamHandler from '../internal/operation-stream'

import '../polyfill/app-polyfills.ts'
// TODO: when actions are supported, this should be removed/changed
process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = 'next'
feedthejim marked this conversation as resolved.
Show resolved Hide resolved
import 'next/dist/server/require-hook'

import type { IncomingMessage } from 'node:http'

import type { RenderData } from 'types/turbopack'
import type { RenderOpts } from 'next/dist/server/app-render/types'

import { renderToHTMLOrFlight } from 'next/dist/server/app-render/app-render'
import { RSC_VARY_HEADER } from 'next/dist/client/components/app-router-headers'
import { headersFromEntries, initProxiedHeaders } from '../internal/headers'
import { parse, ParsedUrlQuery } from 'node:querystring'
Expand All @@ -23,6 +25,10 @@ import { join } from 'node:path'
import { nodeFs } from 'next/dist/server/lib/node-fs-methods'
import { IncrementalCache } from 'next/dist/server/lib/incremental-cache'

const {
renderToHTMLOrFlight,
} = require('next/dist/compiled/next-server/app-page.runtime.dev')

installRequireAndChunkLoad()

const MIME_TEXT_HTML_UTF8 = 'text/html; charset=utf-8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createFromReadableStream } from 'next/dist/compiled/react-server-dom-we
import { callServer } from 'next/dist/client/app-call-server'
import { linkGc } from 'next/dist/client/app-link-gc'

import { HeadManagerContext } from 'next/dist/shared/lib/head-manager-context'
import { HeadManagerContext } from 'next/dist/shared/lib/head-manager-context.shared-runtime'

import { initializeHMR } from '@vercel/turbopack-next/dev/client'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import { IPC } from '@vercel/turbopack-node/ipc/index'

import 'next/dist/server/node-polyfill-fetch.js'
import 'next/dist/server/require-hook'
import './shims'

import type { IncomingMessage, ServerResponse } from 'node:http'

import { renderToHTML, RenderOpts } from 'next/dist/server/render'
import type { RenderOpts } from 'next/dist/server/render'
import { getRedirectStatus } from 'next/dist/lib/redirect-status'
import { PERMANENT_REDIRECT_STATUS } from 'next/dist/shared/lib/constants'
import { buildStaticPaths } from 'next/dist/build/utils'
Expand All @@ -21,6 +22,9 @@ import type { RenderData } from 'types/turbopack'
import type { ChunkGroup } from 'types/next'
import type { NextComponentType } from 'next/types'
import { parse } from 'node:querystring'
const {
renderToHTML,
} = require('next/dist/compiled/next-server/pages.runtime.dev')

const ipc = IPC as Ipc<IpcIncomingMessage, IpcOutgoingMessage>

Expand Down
17 changes: 11 additions & 6 deletions packages/next-swc/crates/next-core/src/app_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{collections::HashMap, io::Write as _, iter::once};

use anyhow::{bail, Result};
use indexmap::indexmap;
use indoc::indoc;
use indoc::formatdoc;
use serde_json::Value as JsonValue;
use turbo_tasks::Vc;
use turbopack_binding::{
Expand Down Expand Up @@ -968,13 +968,18 @@ impl AppRenderer {
.emit();
}

let mut result = RopeBuilder::from(indoc! {"
\"TURBOPACK { chunking-type: isolatedParallel; transition: next-edge-server-component }\";
let mut result = RopeBuilder::from(
formatdoc!(
"
\"TURBOPACK {{ chunking-type: isolatedParallel; transition: {rsc_transition} }}\";
import GlobalErrorMod from \"next/dist/client/components/error-boundary\"
const { GlobalError } = GlobalErrorMod;
\"TURBOPACK { chunking-type: isolatedParallel; transition: next-edge-server-component }\";
const {{ GlobalError }} = GlobalErrorMod;
\"TURBOPACK {{ chunking-type: isolatedParallel; transition: {rsc_transition} }}\";
import base from \"next/dist/server/app-render/entry-base\"\n
"});
"
)
.into_bytes(),
);

for import in loader_tree_module.imports {
writeln!(result, "{import}")?;
Expand Down
7 changes: 3 additions & 4 deletions packages/next-swc/crates/next-core/src/next_edge/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ pub async fn get_edge_resolve_options_context(
];

match ty {
ServerContextType::AppRSC { .. } | ServerContextType::AppRoute { .. } => {
custom_conditions.push("react-server".to_string())
}
ServerContextType::Pages { .. }
ServerContextType::AppRSC { .. } => custom_conditions.push("react-server".to_string()),
ServerContextType::AppRoute { .. }
| ServerContextType::Pages { .. }
| ServerContextType::PagesData { .. }
| ServerContextType::AppSSR { .. }
| ServerContextType::Middleware { .. } => {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,26 @@ impl Transition for NextEdgeRouteTransition {

#[turbo_tasks::function]
async fn process_module(
&self,
self: Vc<Self>,
asset: Vc<Box<dyn Module>>,
context: Vc<ModuleAssetContext>,
) -> Result<Vc<Box<dyn Module>>> {
let new_context = self.process_context(context);
let this = self.await?;
let new_asset = route_bootstrap(
asset,
Vc::upcast(context),
self.base_path,
self.bootstrap_asset,
Vc::upcast(new_context),
this.base_path,
this.bootstrap_asset,
Vc::cell(indexmap! {
"NAME".to_string() => self.entry_name.clone(),
"NAME".to_string() => this.entry_name.clone(),
}),
);

let asset = ChunkGroupFilesAsset {
module: Vc::upcast(new_asset),
client_root: self.output_path,
chunking_context: self.edge_chunking_context,
client_root: this.output_path,
chunking_context: this.edge_chunking_context,
runtime_entries: None,
};

Expand Down
66 changes: 45 additions & 21 deletions packages/next-swc/crates/next-core/src/next_import_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,32 +216,34 @@ pub async fn get_next_server_import_map(
let ty = ty.into_value();

insert_next_server_special_aliases(&mut import_map, ty, mode, NextRuntime::NodeJs).await?;
let external = ImportMapping::External(None).cell();
let external: Vc<ImportMapping> = ImportMapping::External(None).cell();

import_map.insert_exact_alias("next/dist/server/require-hook", external);
match ty {
ServerContextType::Pages { .. } | ServerContextType::PagesData { .. } => {
import_map.insert_exact_alias("next", external);
import_map.insert_wildcard_alias("next/", external);
import_map.insert_exact_alias("react", external);
import_map.insert_wildcard_alias("react/", external);
import_map.insert_exact_alias("react-dom", external);
import_map.insert_wildcard_alias("react-dom/", external);
import_map.insert_exact_alias("styled-jsx", external);
import_map.insert_wildcard_alias("styled-jsx/", external);
import_map.insert_exact_alias("react-server-dom-webpack/", external);
import_map.insert_wildcard_alias("react-server-dom-webpack/", external);
// TODO: we should not bundle next/dist/build/utils in the pages renderer at all
import_map.insert_wildcard_alias("next/dist/build/utils", external);
}
ServerContextType::AppSSR { .. }
| ServerContextType::AppRSC { .. }
| ServerContextType::AppRoute { .. } => {
match mode {
NextMode::Development | NextMode::Build => {
NextMode::Build => {
import_map.insert_wildcard_alias("next/dist/server/", external);
import_map.insert_wildcard_alias("next/dist/shared/", external);
}
NextMode::DevServer => {
// The sandbox can't be bundled and needs to be external
import_map.insert_exact_alias("next/dist/server/web/sandbox", external);
}
NextMode::Development => {}
}
import_map.insert_exact_alias(
"next/head",
Expand Down Expand Up @@ -377,6 +379,11 @@ async fn insert_next_server_special_aliases(
NextRuntime::Edge => request_to_import_mapping(context_dir, request),
NextRuntime::NodeJs => external_request_to_import_mapping(request),
};
let passthrough_external_if_node =
move |context_dir: Vc<FileSystemPath>, request: &str| match runtime {
NextRuntime::Edge => request_to_import_mapping(context_dir, request),
NextRuntime::NodeJs => ImportMapping::External(None).cell(),
};
match (mode, ty) {
(_, ServerContextType::Pages { pages_dir }) => {
import_map.insert_exact_alias(
Expand Down Expand Up @@ -413,12 +420,7 @@ async fn insert_next_server_special_aliases(
(_, ServerContextType::PagesData { .. }) => {}
// In development, we *always* use the bundled version of React, even in
// SSR, since we're bundling Next.js alongside it.
(
NextMode::DevServer,
ServerContextType::AppSSR { app_dir }
| ServerContextType::AppRSC { app_dir, .. }
| ServerContextType::AppRoute { app_dir },
) => {
(NextMode::DevServer, ServerContextType::AppSSR { app_dir }) => {
import_map.insert_exact_alias(
"@opentelemetry/api",
// TODO(WEB-625) this actually need to prefer the local version of
Expand All @@ -427,28 +429,40 @@ async fn insert_next_server_special_aliases(
);
import_map.insert_exact_alias(
"react",
request_to_import_mapping(app_dir, "next/dist/compiled/react"),
passthrough_external_if_node(app_dir, "next/dist/compiled/react"),
);
import_map.insert_wildcard_alias(
"react/",
request_to_import_mapping(app_dir, "next/dist/compiled/react/*"),
passthrough_external_if_node(app_dir, "next/dist/compiled/react/*"),
);
import_map.insert_exact_alias(
"react-dom",
request_to_import_mapping(
passthrough_external_if_node(
app_dir,
"next/dist/compiled/react-dom/server-rendering-stub.js",
),
);
import_map.insert_wildcard_alias(
"react-dom/",
request_to_import_mapping(app_dir, "next/dist/compiled/react-dom/*"),
passthrough_external_if_node(app_dir, "next/dist/compiled/react-dom/*"),
);
import_map.insert_exact_alias(
"styled-jsx",
passthrough_external_if_node(app_dir, "next/dist/compiled/styled-jsx"),
);
import_map.insert_wildcard_alias(
"styled-jsx/",
passthrough_external_if_node(app_dir, "next/dist/compiled/styled-jsx/*"),
);
import_map.insert_wildcard_alias(
"react-server-dom-webpack/",
request_to_import_mapping(app_dir, "next/dist/compiled/react-server-dom-webpack/*"),
passthrough_external_if_node(
app_dir,
"next/dist/compiled/react-server-dom-webpack/*",
),
);
}

// NOTE(alexkirsz) This logic maps loosely to
// `next.js/packages/next/src/build/webpack-config.ts`, where:
//
Expand All @@ -460,7 +474,7 @@ async fn insert_next_server_special_aliases(
// * passes through (react|react-dom|react-server-dom-webpack)/(.*) to
// next/dist/compiled/$1/$2
(
NextMode::Build | NextMode::Development,
NextMode::Build | NextMode::Development | NextMode::DevServer,
ServerContextType::AppRSC { app_dir, .. } | ServerContextType::AppRoute { app_dir },
) => {
import_map.insert_exact_alias(
Expand All @@ -469,10 +483,20 @@ async fn insert_next_server_special_aliases(
// @opentelemetry/api
request_to_import_mapping(app_dir, "next/dist/compiled/@opentelemetry/api"),
);
import_map.insert_exact_alias(
"react",
request_to_import_mapping(app_dir, "next/dist/compiled/react/react.shared-subset"),
);
if matches!(ty, ServerContextType::AppRSC { .. }) {
import_map.insert_exact_alias(
"react",
request_to_import_mapping(
app_dir,
"next/dist/compiled/react/react.shared-subset",
),
);
} else {
import_map.insert_exact_alias(
"react",
request_to_import_mapping(app_dir, "next/dist/compiled/react"),
);
}
import_map.insert_exact_alias(
"react-dom",
request_to_import_mapping(
Expand Down
Loading