Unverified Commit 36afda44 authored by Justin Ridgewell's avatar Justin Ridgewell Committed by GitHub

Turbopack: remap `next/head` on client in App Pages (#55419)

### What?

Remaps `next/head` to `next/dist/client/components/noop-head` on the client inside an App Page.

### Why?

Because webpack bundles do it.

### How?

We were just missing an import remap. 🤦 

Closes WEB-1573
parent 1e332532
...@@ -109,6 +109,10 @@ pub async fn get_next_client_import_map( ...@@ -109,6 +109,10 @@ pub async fn get_next_client_import_map(
"react-server-dom-webpack/", "react-server-dom-webpack/",
request_to_import_mapping(app_dir, "next/dist/compiled/react-server-dom-webpack/*"), request_to_import_mapping(app_dir, "next/dist/compiled/react-server-dom-webpack/*"),
); );
import_map.insert_exact_alias(
"next/head",
request_to_import_mapping(project_path, "next/dist/client/components/noop-head"),
);
import_map.insert_exact_alias( import_map.insert_exact_alias(
"next/dynamic", "next/dynamic",
request_to_import_mapping(project_path, "next/dist/shared/lib/app-dynamic"), request_to_import_mapping(project_path, "next/dist/shared/lib/app-dynamic"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment