Skip to content

Commit

Permalink
Fix bug with imports field from a nested directory
Browse files Browse the repository at this point in the history
Fixes WEB-1216
  • Loading branch information
jridgewell committed Jun 23, 2023
1 parent 9a2a457 commit 0abb53d
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/turbopack-core/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ async fn resolve_package_internal_with_imports_field(
};

handle_exports_imports_field(
context,
package_json_path.parent(),
*package_json_path,
resolve_options,
imports,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "foo";
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import foo from "./nested";

console.log(foo);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import foo from "#foo";
export default foo;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "subpath-imports",
"imports": {
"#foo": "./foo.js"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0abb53d

Please sign in to comment.