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

blacklist completely ignored #58

Closed
samuela opened this issue Sep 18, 2017 · 4 comments
Closed

blacklist completely ignored #58

samuela opened this issue Sep 18, 2017 · 4 comments

Comments

@samuela
Copy link

samuela commented Sep 18, 2017

Do you want to request a feature or report a bug?

bug

What is the current behavior?

The file blacklist is ignored.

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

With react-native v0.48.3 init a new project and add a rn-cli.config.js file to the root directory:

const metroBundler = require('metro-bundler');

module.exports = {
  getBlacklistRE: function() {
    console.log("yes, i am being called but no one seems to listen.");
    // ignore everything!
    return metroBundler.createBlacklist([/.*/]);
  },
};

Now, run react-native run-ios the packager will open up print the message and still bundle everything!

A cursory look through the source code did not uncover any places where the blacklistRE option was ever actually used in the code. I couldn't find any tests for blacklistRE either.

What is the expected behavior?

For the blacklist to work.

Please provide your exact metro-bundler configuration and mention your metro-bundler, node, yarn/npm version and operating system.

metro-bundler 0.11.0
react-native 0.48.3
yarn 0.17.2
macOS

@samuela
Copy link
Author

samuela commented Sep 18, 2017

For context, I'm trying to blacklist because of invertase/react-native-firebase#414 (comment).

@samuela
Copy link
Author

samuela commented Sep 19, 2017

Ok, I think running with npm start -- --reset-cache before react-native run-ios works, so this appears to be a caching issue.

@cpojer cpojer closed this as completed Oct 9, 2017
@cpojer
Copy link
Contributor

cpojer commented Oct 9, 2017

We are now considering the blacklist in the latest version of Metro.

@samuela
Copy link
Author

samuela commented Dec 1, 2017

@cpojer You mean considering the blacklist for cache invalidation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants