Skip to content

Can't exclude/ignore/external a peerDependency #1663

@codebling

Description

@codebling

Any peer dependency of a package cannot be excluded when requiring that package.

e.g. Using package react-select, which has a peer dependency on react, the following command will always include react in the bundle, despite the fact that it has been excluded with -u. -i and -x behave the same.

browserify -r react-select -u react -o bundle.js

This was tested with version 13.1.1 of Browserify. You can find an example using Gulp with the Browserify API in browserify-exclude-test.

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