Skip to content

[node-resolve] package.json "browser" paths are incorrectly resolved for sub-paths #919

@eemeli

Description

@eemeli

Expected Behavior

Build should succeed.

Actual Behavior

Build fails with a circular dependency:

node_modules/yaml/browser/index.js -> node_modules/yaml/browser/index.js

This is due to the browser import path for "./dist/index.js" being incorrectly applied when used in the browser/ sub-path of the yaml package.

Additional Information

Originally reported by @jdesrosiers as eemeli/yaml#291, see there for some initial debugging.

I'll work on a PR potentially fixing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions