File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ module.exports = (api, options = {}) => {
115
115
api . extendPackage ( {
116
116
scripts,
117
117
dependencies,
118
- devDependencies,
119
- main : 'background.js'
118
+ devDependencies
120
119
} )
121
120
}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ module.exports = (api, options) => {
233
233
// Copy main process file instead of bundling it
234
234
fs . copySync (
235
235
api . resolve ( mainProcessFile ) ,
236
- api . resolve ( `${ outputDir } /bundled/background .js` )
236
+ api . resolve ( `${ outputDir } /bundled/index .js` )
237
237
)
238
238
buildApp ( args . skipElectronBuild )
239
239
}
@@ -560,8 +560,7 @@ function bundleMain ({
560
560
561
561
config . output
562
562
. path ( api . resolve ( outputDir + ( isBuild ? '/bundled' : '' ) ) )
563
- // Electron will not detect background.js on dev server, only index.js
564
- . filename ( '[name].js' )
563
+ . filename ( 'index.js' )
565
564
const envVars = { }
566
565
if ( isBuild ) {
567
566
// Set __static to __dirname (files in public get copied here)
@@ -633,9 +632,7 @@ function bundleMain ({
633
632
let preloadConfig = new Config ( )
634
633
635
634
mainConfig . target ( 'electron-main' )
636
- mainConfig
637
- . entry ( isBuild ? 'background' : 'index' )
638
- . add ( api . resolve ( mainProcessFile ) )
635
+ mainConfig . entry ( 'index' ) . add ( api . resolve ( mainProcessFile ) )
639
636
640
637
preloadConfig . target ( 'electron-preload' )
641
638
let preload = pluginOptions . preload
You can’t perform that action at this time.
0 commit comments