browserify / browserify/browserify

Can't exclude/ignore/external a peerDependency

Open
#1,663 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.7k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

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

e.g. Using package [react-select](https://www.npmjs.com/package/react-select), which has a [peer dependency on react](https://github.com/JedWatson/react-select/blob/v1.0.0-rc.1/package.json#L44), 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](https://github.com/codebling/browserify-exclude-test).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.