Skip to content
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
Closed

Support swapping out packages rather than files. #1

terinjokes opened this issue Feb 27, 2014 · 7 comments

Comments

@terinjokes
Copy link

@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
Copy link
Owner

@thlorenz 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
Copy link
Author

@terinjokes terinjokes commented Mar 30, 2014

Sure. On my list of tasks to do. 😄

@chrisabrams
Copy link

@chrisabrams chrisabrams commented Apr 26, 2014

@terinjokes good idea!

@thlorenz
Copy link
Owner

@thlorenz 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
Copy link

@TomOne TomOne commented May 29, 2014

This feature would be great. :bowtie:

@scamden
Copy link

@scamden scamden commented May 11, 2015

+1

@ljharb
Copy link

@ljharb 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants