Skip to content

Bug: Same named file resolve in different order than specified in extensions #438

Description

@pke

Given 2 files

foo.json
foo.tsx

the statement:

import { foo } from "foo"

loads the .json file and not the .tsx.

The order of the extensions mentioned in the config (which lists json as last) does not seem to be relevant.

Activity

  1. hiSandog commented on Jun 27, 2026

    @hiSandog

    This would be a good regression fixture because the expected behavior is very concrete: with extensions ordered as ['.tsx', '.ts', '.json'], resolving foo should choose foo.tsx before foo.json. If the plugin currently delegates to a resolver that uses its own default extension order, the fix likely needs to ensure the configured extension list is passed through unchanged and tested with same-basename files in one directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions