Remove direct eval from react devtools
Reviewed By: lblasa Differential Revision: D39467192 fbshipit-source-id: 925678b17c9a454298aa141eb19e1ae6aa9c369f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f463520522
commit
62bb4df8d7
@@ -78,8 +78,9 @@ export function devicePlugin(client: DevicePluginClient<Events, Methods>) {
|
|||||||
if (newGlobalDevToolsSource) {
|
if (newGlobalDevToolsSource) {
|
||||||
globalDevToolsInstance = {
|
globalDevToolsInstance = {
|
||||||
type: 'global',
|
type: 'global',
|
||||||
|
// https://esbuild.github.io/content-types/#direct-eval
|
||||||
// eslint-disable-next-line no-eval
|
// eslint-disable-next-line no-eval
|
||||||
module: eval(newGlobalDevToolsSource),
|
module: (0, eval)(newGlobalDevToolsSource),
|
||||||
};
|
};
|
||||||
|
|
||||||
globalDevToolsAvailable.set(true);
|
globalDevToolsAvailable.set(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user