ElectronでChrome Extension使えるようにするまでのハマりどころ ref: http://qiita.com/inuscript/items/590c96041163d09467d5
const {BrowserWindow} = electron;
const os = require('os')
const path = require('path')
const fs = require('fs')
function createWindow() {
:
:
// react dev toolのID
const id = "fmkadmapgofadopljbjfkapdkoienihi"
// extensionの場所、"~/Library"だとダメだった
const extensionDir = path.resolve(os.homedir(), "Library/Application Support/Google/Chrome/Default/Extensions/")
// version指定
const versions = fs.readdirSync(`${extensionDir}/${id}`).sort()
const version = versions.pop()
// 利用
BrowserWindow.addDevToolsExtension(`${extensionDir}/${id}/${version}`)
}
app.on('ready', createWindow);