New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swapping out packages rather than files. #1

Closed
terinjokes opened this Issue Feb 27, 2014 · 7 comments

Comments

Projects
None yet
6 participants
@terinjokes

terinjokes commented Feb 27, 2014

Right now browserify-swap replaces files that match a regex, so to replace underscore you'll have something like

{
  "all": {
    "underscore.js$": "lodash"
  }
}

Since the package structure is not usually part of the public API, it would be nice to be able to replace based on package name, like with the browser field. This would become:

{
  "all": {
    "underscore": "lodash"
  }
}
@thlorenz

This comment has been minimized.

Owner

thlorenz commented Mar 29, 2014

Interesting idea, Could you fork and experiment how that could be done?
Would love to merge a PR that adds this feature.

@terinjokes

This comment has been minimized.

terinjokes commented Mar 30, 2014

Sure. On my list of tasks to do. 😄

@chrisabrams

This comment has been minimized.

chrisabrams commented Apr 26, 2014

@terinjokes good idea!

@thlorenz

This comment has been minimized.

Owner

thlorenz commented May 22, 2014

Closing, but looking forward to PR that adds this.

However we should investigate if some of this could be better solved with browserify plugins.
Keep in mind that plugins didn't exist when I implemented this initially.

@thlorenz thlorenz closed this May 22, 2014

@TomOne

This comment has been minimized.

TomOne commented May 29, 2014

This feature would be great. :bowtie:

@scamden

This comment has been minimized.

scamden commented May 11, 2015

+1

@ljharb

This comment has been minimized.

ljharb commented Jun 2, 2016

Personally I'd be very interested in only this feature - ie, I want to swap out npm-installed packages, but i'd never want to swap out local files where I have full control of the code.

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