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

Add support for project-specific rn-cli.config.js

Compare
Choose a tag to compare
@jevakallio jevakallio released this 26 Apr 08:14
· 30 commits to master since this release

Whackage now supports project-specific packager configurations. In order to use this feature, your configuration must conform to the following spec.

  1. Your config file needs to be called rn-cli.config.js, and be present in the project root directory
  2. Your getBlackListRE method must take an optional array of "default" modules to blacklist, and pass those to blacklist along with your own blacklisted modules.

Example:

// rn-cli.config.js
const blacklist = require('react-native/packager/blacklist');

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

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

Any other configuration methods should work out of the box without modification.