mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
Blacklist modules from being how swapped
Reviewed By: frantic Differential Revision: D3007480 fb-gh-sync-id: b563a9839c37110f7639b3f1db80ac2663d560ba shipit-source-id: b563a9839c37110f7639b3f1db80ac2663d560ba
This commit is contained in:
parent
62177dbb3b
commit
a1821ae523
@ -12,6 +12,10 @@ const getInverseDependencies = require('node-haste').getInverseDependencies;
|
|||||||
const querystring = require('querystring');
|
const querystring = require('querystring');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
|
|
||||||
|
const blacklist = [
|
||||||
|
'Libraries/Utilities/HMRClient.js',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attaches a WebSocket based connection to the Packager to expose
|
* Attaches a WebSocket based connection to the Packager to expose
|
||||||
* Hot Module Replacement updates to the simulator.
|
* Hot Module Replacement updates to the simulator.
|
||||||
@ -124,6 +128,14 @@ function attachHMRServer({httpServer, path, packagerServer}) {
|
|||||||
`[Hot Module Replacement] File change detected (${time()})`
|
`[Hot Module Replacement] File change detected (${time()})`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const blacklisted = blacklist.find(path =>
|
||||||
|
filename.indexOf(path) !== -1
|
||||||
|
);
|
||||||
|
|
||||||
|
if (blacklisted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
client.ws.send(JSON.stringify({type: 'update-start'}));
|
client.ws.send(JSON.stringify({type: 'update-start'}));
|
||||||
stat.then(() => {
|
stat.then(() => {
|
||||||
return packagerServer.getShallowDependencies(filename)
|
return packagerServer.getShallowDependencies(filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user