fix(javascript): preserve literal CommonJS path punctuation (#576)

This commit is contained in:
Kaoru0822 authored and GitHub committed 2026-10-05 22:28:51 +08:00
1 parent 52bf709bce
commit 063cd25a93
8 files changed
+290 -7

No files matched your search

@@ -113,7 +113,8 @@ const contextualCandidate = (
): string | ArtifactPathResolution => {
const { context } = input;
const declared =
context === "module-specifier" || context === "html-reference"
context === "html-reference" ||
(context === "module-specifier" && input.moduleKind !== "require")
? stripQueryAndFragment(input.declaredPath)
: input.declaredPath;
if (context === "html-reference") return htmlCandidate(input);