Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Add support for custom rn-cli.config.js#8

Merged
jevakallio merged 2 commits intomasterfrom
feature/support-custom-rn-cli.js
Apr 26, 2017
Merged

Add support for custom rn-cli.config.js#8
jevakallio merged 2 commits intomasterfrom
feature/support-custom-rn-cli.js

Conversation

@jevakallio
Copy link
Copy Markdown
Contributor

@jevakallio jevakallio commented Apr 26, 2017

Solves #7

API

The only requirements are, that the user's config needs to be called /rn-cli.config.js (in the project root), and the getBlackListRE method must take an optional array of "default" modules to blacklist, and pass those to blacklist. Something like:

const blacklist = require('react-native/packager/blacklist');

module.exports = {
  getBlacklistRE(defaults = []) {
    const modulesToBlacklist = [
      /* ... your deps */
    ];

    return blacklist(defaults.concat(modulesToBlacklist));
  }
};

All the other custom config methods are passed through and should work unmodified.

Testing notes

The easiest way to test this is:

git clone git@github.com:FormidableLabs/whackage.git
git checkout feature/support-custom-rn-cli.js
npm install
npm link

And in your own project:

npm link whackage

@parshap
Copy link
Copy Markdown

parshap commented Apr 26, 2017

Tested and this is working great!

@jevakallio jevakallio merged commit 86fa8d0 into master Apr 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants