Skip to content

Commit

Permalink
fix turbopack mdx import map (#51881)
Browse files Browse the repository at this point in the history
I accidentally broke this with #49818
  • Loading branch information
ForsakenHarmony committed Jun 28, 2023
1 parent e7a6925 commit f1a4f7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/next-swc/crates/next-core/src/next_import_map.rs
Expand Up @@ -33,6 +33,7 @@ use crate::{
next_server::context::ServerContextType,
};

// Make sure to not add any external requests here.
/// Computes the Next-specific client import map.
#[turbo_tasks::function]
pub async fn get_next_client_import_map(
Expand Down Expand Up @@ -426,6 +427,7 @@ pub fn mdx_import_source_file() -> String {
format!("{VIRTUAL_PACKAGE_NAME}/mdx-import-source")
}

// Make sure to not add any external requests here.
pub async fn insert_next_shared_aliases(
import_map: &mut ImportMap,
project_path: FileSystemPathVc,
Expand All @@ -441,7 +443,7 @@ pub async fn insert_next_shared_aliases(
vec![
request_to_import_mapping(project_path, "./mdx-components"),
request_to_import_mapping(project_path, "./src/mdx-components"),
external_request_to_import_mapping("@mdx-js/react"),
request_to_import_mapping(project_path, "@mdx-js/react"),
],
);
}
Expand Down

0 comments on commit f1a4f7a

Please sign in to comment.