Skip to content

Commit

Permalink
Merge b81aff8 into 0295873
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Nov 21, 2023
2 parents 0295873 + b81aff8 commit 175b46d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/turbopack/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ async fn base_resolve_options(
ext.push(".jsx".to_string());
}
ext.push(".js".to_string());
if opt.enable_mjs_extension {
ext.push(".mjs".to_string());
}
if opt.enable_node_native_modules {
ext.push(".node".to_string());
}
Expand Down
3 changes: 3 additions & 0 deletions crates/turbopack/src/resolve_options_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pub struct ResolveOptionsContext {
#[serde(default)]
pub enable_node_native_modules: bool,
#[serde(default)]
// Enable resolving of .mjs files without the .mjs extension
pub enable_mjs_extension: bool,
#[serde(default)]
/// Enable resolving of the node_modules folder when within the provided
/// directory
pub enable_node_modules: Option<Vc<FileSystemPath>>,
Expand Down

0 comments on commit 175b46d

Please sign in to comment.