-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
packager: a way to blacklist some folders/files in a RN app? #7271
Comments
There is a
|
thanks @radko93 !! |
The code above is outdated or was incorrect, getBlacklistRE and blacklist do not take any parameters. `var blacklist = require('react-native/packager/blacklist'); var config = { module.exports = config;` |
I was suffering the same thing at #12582 My code ended up being const blacklist = require('react-native/packager/blacklist');
module.exports = {
getBlacklistRE: () => blacklist([
/coverage\/.*/,
]),
}; and my "start": "react-native run-ios --config=rn-cli.config.js", |
blacklist does not exist anymore in react-native 46 :( so after a little bit of research, i found out that we have to use |
thanks @alinz that works for me |
As of react-native 47 I have to do something like:
|
@azundo That doesn't work for me as of react-native 0.48.3 and metro-bundler 0.11.0: facebook/metro#58 |
@samuela const blacklist = require('metro-bundler/src/blacklist')
var config = {
getBlackListRE() {
return blacklist([
// your folders here
]);
}
};
module.exports = config; |
( Correction: I had wrong case Change getBlackListRE -> getBlacklistRE ) After trying most all of the half-dozen above variations... blacklist du jour
const blacklist = require('metro/src/blacklist');
|
@esutton |
@theRealRobG Thank you for taking the time to point out my mistake! |
Hi,
I have some folders under my root app like for instance a standalone node project that are not used by the app but for something else. How can I tell the packager to ignore these? It breaks when packager try to read the content of node_modules of that sub project, it shouldn't have enter there in the first place (because I never depend on it from any of the RN app jsbundle !!)
The text was updated successfully, but these errors were encountered: