dnt icon indicating copy to clipboard operation
dnt copied to clipboard

Mappings only work for default entry points of JSR packages?

Open gadicc opened this issue 4 months ago • 0 comments

Input:

import * as path from "@std/path";
import { globToRegExp } from "@std/path/glob-to-regexp";

Output:

import * as path from "../../deps/jsr.io/@std/path/1.1.2/mod.js";
import { globToRegExp } from "@std/path/glob-to-regexp"; // <-- problem

and without the first line, deps/jsr.io/@std/path won't exist either.

Easy workaround in this case is to simply:

-import { globToRegExp } from "@std/path/glob-to-regexp";
+import { globToRegExp } from "@std/path";

But of course that depends on the default entry point exporting what you need.

gadicc avatar Sep 17 '25 12:09 gadicc