mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-04 10:55:04 +08:00
add reset-cache command to bundle
Summary:
Currently the `react-native bundle` has no option to reset the file cache. For example changing the .babelrc has no effect on the bundling process. `react-native start` has it already implemented, so this is just a small addition.
**Test plan (required)**
the issue:
- `react-native init` a new project
- run `react-native bundle` (should work as expected)
- create `.babelrc` with empty object ```{}```
- rerun `react-native bundle`
- should fail now with `Unexptected token` (no babel plugins configured)
- if not failing, your cache already hit (clear $TMPDIR to get the error)
- delete .babelrc and rerun `bundle`
- still failing, but it should went back to normal
- delete your $TMPDIR contents
- works again
The option `--reset-cache` should fix that
Closes https://github.com/facebook/react-native/pull/7297
Differential Revision: D3241259
Pulled By: davidaurelio
fb-gh-sync-id: 0ed5b58aa1f021d72021f4c80fbc57d2e7e8181f
fbshipit-source-id: 0ed5b58aa1f021d72021f4c80fbc57d2e7e8181f
This commit is contained in:
committed by
Facebook Github Bot 3
parent
cccb8db175
commit
90f9f48498
@@ -57,5 +57,9 @@ module.exports = [
|
||||
command: 'verbose',
|
||||
description: 'Enables logging',
|
||||
default: false,
|
||||
}, {
|
||||
command: 'reset-cache',
|
||||
description: 'Removes cached files',
|
||||
default: false
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user