diff --git a/packages/fether-electron/src/main/utils/staticPath.js b/packages/fether-electron/src/main/utils/staticPath.js index 05da96ceb1e3bf95386d976792b2f23130eca09f..02307e9fcae2517553b7255e4b5f6aa2f05a5a0a 100644 --- a/packages/fether-electron/src/main/utils/staticPath.js +++ b/packages/fether-electron/src/main/utils/staticPath.js @@ -5,14 +5,14 @@ /* global __static */ -import { app } from 'electron'; +const appIsPackaged = !process.defaultApp; /** * Get the path to the `static` folder. * * @see https://github.com/electron-userland/electron-webpack/issues/52 */ -const staticPath = app.isPackaged +const staticPath = appIsPackaged ? __dirname.replace(/app\.asar$/, 'static') : __static;