Skip to content

Commit

Permalink
absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Aug 7, 2023
1 parent ebd454c commit edcc052
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { displayB } from "../packages/b/src/index";
import { displayB } from "../../../../../packages/b/src/index";
async function display() {
const displayA = await import("../packages/a/src/index").then((c)=>c.displayA);
const displayA = await import("../../../../../packages/a/src/index").then((c)=>c.displayA);
console.log(displayA());
console.log(displayB());
}
Expand Down
6 changes: 5 additions & 1 deletion crates/swc_ecma_transforms_module/tests/path_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ fn paths_resolver(
base_url: impl AsRef<Path>,
rules: Vec<(String, Vec<String>)>,
) -> JscPathsProvider {
let base_url = base_url.as_ref().to_path_buf();
let base_url = base_url
.as_ref()
.to_path_buf()
.canonicalize()
.expect("failed to canonicalize");
dbg!(&base_url);

NodeImportResolver::with_base_dir(
Expand Down

0 comments on commit edcc052

Please sign in to comment.