mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 09:00:55 +00:00
inline __accept
call so that sourcemaps work
Summary:Sourcemaps on HMR where a couple of line off. The problem is that since the `__accept` call doesn't go through the sourcemaps pipeline we need to make sure that call is a single-line one.
This was originally written in a single line but I incorrectly updated it on 436db67126
. Would be great having test coverage for this.
Reviewed By: davidaurelio
Differential Revision: D3075164
fb-gh-sync-id: c77ea99f26bdd675f241c5d20a620eb4ddfbf701
shipit-source-id: c77ea99f26bdd675f241c5d20a620eb4ddfbf701
This commit is contained in:
parent
ec6770551c
commit
bcb37c0b6a
@ -96,15 +96,15 @@ Error: ${e.message}`
|
|||||||
? global.nativeInjectHMRUpdate
|
? global.nativeInjectHMRUpdate
|
||||||
: eval;
|
: eval;
|
||||||
|
|
||||||
// TODO: (martinb) yellow box if cannot accept module
|
code = [
|
||||||
code = `
|
`__accept(`,
|
||||||
__accept(
|
`${name},`,
|
||||||
${name},
|
`function(global,require,module,exports){`,
|
||||||
function(global, require, module, exports) {
|
`${code}`,
|
||||||
${code}
|
'\n},',
|
||||||
},
|
`${JSON.stringify(inverseDependencies)}`,
|
||||||
${JSON.stringify(inverseDependencies)}
|
`);`,
|
||||||
);`;
|
].join('');
|
||||||
|
|
||||||
injectFunction(code, sourceURLs[i]);
|
injectFunction(code, sourceURLs[i]);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user