From 5d54ecba3ab1cf1c1354501d62ed581a935c4f91 Mon Sep 17 00:00:00 2001 From: Eddie Wang Date: Fri, 13 Jul 2018 15:23:23 -0400 Subject: [PATCH] add appEntry check for renderer --- js/rendererjs/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/rendererjs/index.js b/js/rendererjs/index.js index 80d1a03d..87fb8569 100644 --- a/js/rendererjs/index.js +++ b/js/rendererjs/index.js @@ -13,7 +13,10 @@ import { const App = remote.app const mainWindow = remote.getCurrentWindow() -const defaultPluginDirectory = Path.join(process.cwd(), 'plugins') +const appEntry = process.env.NODE_ENV === 'development' + ? process.cwd() + : App.getAppPath() +const defaultPluginDirectory = Path.join(appEntry, 'plugins') const defaultHomePlugin = 'Files' const config = remote.getGlobal('config') const globalPlugins = []