Support index.js module resolution at startup of Electron.
This commit is contained in:
parent
d7cf460918
commit
7a23add23b
2 changed files with 7 additions and 1 deletions
|
@ -92,5 +92,8 @@ app.setAppPath packagePath
|
|||
# Load the chrome extension support.
|
||||
require './chrome-extension'
|
||||
|
||||
# Set main startup script of the app.
|
||||
mainStartupScript = packageJson.main or 'index.js'
|
||||
|
||||
# Finally load app's main.js and transfer control to C++.
|
||||
Module._load path.join(packagePath, packageJson.main), Module, true
|
||||
Module._load path.join(packagePath, mainStartupScript), Module, true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue