Socket
Book a DemoInstallSign in
Socket

react-dev-tools-iframe-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dev-tools-iframe-webpack-plugin

By default, React apps running in iframes are not picked up by the React dev tools extension.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

react-dev-tools-iframe-webpack-plugin

By default, React apps running in iframes are not picked up by the React dev tools extension.

For dev tools to pick up React apps in iframes, you need to add code that sets the dev tools hook to the parent window, but the code must run before the React code runs. The must be added outside your bundle if you use ES imports (which are hoisted).

This plugin adds the code to set the dev tools hook before the React code runs.

Usage

Install:

yarn add --dev react-dev-tools-iframe-webpack-plugin

or with npm:

npm install --save-dev react-dev-tools-iframe-webpack-plugin

And add it to your plugins array in the webpack config:

const ReactDevToolsIFramePlugin = require('react-dev-tools-iframe-webpack-plugin');

module.exports = {
  // ..
  plugins: [new ReactDevToolsIFramePlugin()]
};

FAQs

Package last updated on 02 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts