-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
important for freshIssues that are important for Fresh usersIssues that are important for Fresh users
Description
The order of the passed node conditions is ignored. It won't check them left to right, but rather pick any matching piece. This causes problems when a package unexpectedly uses the CJS entrypoint instead of ESM.
- Run
deno init
- Run
deno i jsr:@deno/loader npm:@radix-ui/themes
- Run this script:
import { ResolutionMode, Workspace } from "@deno/loader";
const loader = await new Workspace({
platform: "browser",
preserveJsx: true,
cachedOnly: true,
nodeConditions: ["import", "require"],
}).createLoader();
const resolved = await loader.resolve(
"@radix-ui/themes",
"foo.tsx",
ResolutionMode.Import
);
// Picks require entry instead of import
console.log({ resolved });
fry69
Metadata
Metadata
Assignees
Labels
important for freshIssues that are important for Fresh usersIssues that are important for Fresh users