-
Notifications
You must be signed in to change notification settings - Fork 0
Electron React
Wenhao Ni edited this page Dec 19, 2018
·
1 revision
-
Electron用
package.json
とelectron-main.js
を/public
にコピーpackage.json
{ "name": "jose-conv", "version": "1.0.0", "description": "", "main": "electron-main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }
electron-main.js
const electron = require('electron'); const app = electron.app; const BrowserWindow = electron.BrowserWindow; let mainWindow; const createWindow = () => { mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow.loadFile('index.html'); // mainWindow.webContents.openDevTools(); mainWindow.on('close', () => { mainWindow = null; }); } app.on('ready', createWindow) app.on('window-all-closed', () => app.quit()); app.on('activate', () => (mainWindow || createWindow()));
-
build/pathes.js
を修正dev@dev-VirtualBox:~/request-conv$ git diff config/paths.js diff --git a/config/paths.js b/config/paths.js index c24b4dd..bf05481 100644 --- a/config/paths.js +++ b/config/paths.js @@ -81,7 +81,8 @@ module.exports = { proxySetup: resolveApp('src/setupProxy.js'), appNodeModules: resolveApp('node_modules'), publicUrl: getPublicUrl(resolveApp('package.json')), - servedPath: getServedPath(resolveApp('package.json')), + //servedPath: getServedPath(resolveApp('package.json')), + servedPath: "", };