refactor: remove electron.asar and embed JS in binary (#18577)

* refactor: remove electron.asar and embed JS in binary

* chore: update DEPS to merged node sha

* chore: remove unneeded eslint ignore
This commit is contained in:
Samuel Attard 2019-06-03 17:03:59 -07:00 committed by GitHub
parent 901cdb22e3
commit 24b3d66767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 44 additions and 62 deletions

View file

@ -106,7 +106,7 @@ if (process.resourcesPath) {
for (packagePath of searchPaths) {
try {
packagePath = path.join(process.resourcesPath, packagePath)
packageJson = __non_webpack_require__(path.join(packagePath, 'package.json')) // eslint-disable-line
packageJson = Module._load(path.join(packagePath, 'package.json'))
break
} catch {
continue
@ -197,6 +197,7 @@ Promise.all([
if (packagePath) {
// Finally load app's main.js and transfer control to C++.
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false)
Module._load(path.join(packagePath, mainStartupScript), Module, true)
} else {
console.error('Failed to locate a valid package to load (app, app.asar or default_app.asar)')