LoginSignup
2
3

More than 5 years have passed since last update.

ElectronでDevTools拡張を使う(React, Redux)

Last updated at Posted at 2019-03-17

Electronの開発時に拡張使いたいですよね。
electron-devetools-installerを使う方法を紹介します。
複数拡張を入れるときどうするんだとちょい迷ったので。

スクリーンショット 2019-03-17 18.12.06.png

インストール

npm install electron-devtools-installer --save-dev

起動時に拡張をインストール

メインプロセスのファイルでこれらを追加するだけ!おわり!

import installExtension, {
  REACT_DEVELOPER_TOOLS,
  REDUX_DEVTOOLS
} from "electron-devtools-installer";
...
function createWindow() {
...
    installExtension([REDUX_DEVTOOLS, REACT_DEVELOPER_TOOLS])
      .then(name => console.log(name))
      .catch(err => console.log(err));
}

参考

DevTools拡張/本家ドキュメント

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3