Resolve package.json path

This commit is contained in:
Igor Gassmann 2017-12-04 17:09:40 -03:00
parent 496acd0a3c
commit d4466703c4
2 changed files with 2 additions and 1 deletions

View file

@ -20,7 +20,7 @@ const { remote, ipcRenderer, shell } = require("electron");
const path = require("path"); const path = require("path");
const { download } = remote.require("electron-dl"); const { download } = remote.require("electron-dl");
const fs = remote.require("fs"); const fs = remote.require("fs");
const { lbrySettings: config } = require("../../../../../package.json"); const { lbrySettings: config } = require("package.json");
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000; const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
export function doOpenModal(modal, modalProps = {}) { export function doOpenModal(modal, modalProps = {}) {

View file

@ -17,6 +17,7 @@ module.exports = {
}, },
// This allows imports to be made from the renderer process root (https://moduscreate.com/blog/es6-es2015-import-no-relative-path-webpack/). // This allows imports to be made from the renderer process root (https://moduscreate.com/blog/es6-es2015-import-no-relative-path-webpack/).
resolve: { resolve: {
descriptionFiles: ["package.json"],
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname], modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
extensions: ['.js', '.jsx', '.scss'] extensions: ['.js', '.jsx', '.scss']
} }