Skip to content

Commit

Permalink
fix(es/module): Fix handling of * in jsc.paths (#8535)
Browse files Browse the repository at this point in the history
**Related issue:**

 - Closes #8375
  • Loading branch information
kdy1 authored Jan 21, 2024
1 parent 9c23f1c commit 2d8bd9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/swc/tests/fixture/issues-8xxx/8375/1/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interop_require_wildcard = require("src/@swc/helpers/_/_interop_require_wildcard");
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _hello = require("./src/hello");
const _node = _interop_require_wildcard._(require("src/@sentry/node"));
const _node = _interop_require_wildcard._(require("@sentry/node"));
_node;
(0, _hello.helloWorld)("SWC"); /*#__PURE__*/
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { nanoid } from "./nanoid";
import { nanoid } from "nanoid";
import { fnv1a } from "../fnv1a";
export var VERCEL_AUTHENTICATED_PREFIX = "v_";
/**
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_loader/src/resolvers/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ where
Err(err) => err,
});

if to.len() == 1 {
if to.len() == 1 && !prefix.is_empty() {
info!(
"Using `{}` for `{}` because the length of the jsc.paths entry is \
1",
Expand Down

0 comments on commit 2d8bd9e

Please sign in to comment.