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

resetCache and others from metro.config.json get overwritten #22835

Closed
3 tasks done
jens-duttke opened this issue Jan 1, 2019 · 2 comments
Closed
3 tasks done

resetCache and others from metro.config.json get overwritten #22835

jens-duttke opened this issue Jan 1, 2019 · 2 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@jens-duttke
Copy link

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Memory: 5.73 GB / 15.88 GB
Binaries:
npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5014246

Description

Regarding https://facebook.github.io/metro/docs/en/configuration.html, it should be possible to set resetCache in the metro.config.json. Unfortunately, in react-native/local-cli/server/runServer.js line 64, the config option is overwritten by the command line arguments, without to consider that it's already set in the metro.config.json.
The same count for other options like projectRoot, watchFolders, server.port, maxWorkers ...

Reproducible Demo

In any project, create a metro.config.json with this content:

{
	"resetCache": true
}

It will not clear the cache.

@Salakar
Copy link
Contributor

Salakar commented Mar 19, 2019

Hey @jens-duttke - thanks so much for reporting this with a reproducible example and pinpointing that the issue lies with the option being overridden by the CLI.

We'll move this issue to the new CLI community repo for review.

@cpojer
Copy link
Contributor

cpojer commented Mar 19, 2019

This issue has been moved to react-native-community/cli#249.

@cpojer cpojer closed this as completed Mar 19, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants