mirror of https://github.com/status-im/metro.git
Don't extract dependencies from .json files
Reviewed By: davidaurelio Differential Revision: D2832417 fb-gh-sync-id: 8bf3705bf620f3cc6d713ca08dde52464185797a
This commit is contained in:
parent
fb94be4358
commit
a258d55716
|
@ -109,10 +109,11 @@ class Module {
|
|||
)[1];
|
||||
}
|
||||
|
||||
// Ignore requires in generated code. An example of this is prebuilt
|
||||
// files like the SourceMap library.
|
||||
if ('extern' in moduleDocBlock) {
|
||||
// Ignore requires in JSON files or generated code. An example of this
|
||||
// is prebuilt files like the SourceMap library.
|
||||
if (this.isJSON() || 'extern' in moduleDocBlock) {
|
||||
data.dependencies = [];
|
||||
data.asyncDependencies = [];
|
||||
} else {
|
||||
var dependencies = (this._extractor || extractRequires)(content).deps;
|
||||
data.dependencies = dependencies.sync;
|
||||
|
|
Loading…
Reference in New Issue