File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ describe('electron:serve', () => {
311
311
mainConfig . resolve ? mainConfig . resolve . extensions : [ ]
312
312
) . not . toContain ( 'ts' )
313
313
// Proper entry file is used
314
- expect ( mainConfig . entry . background [ 0 ] ) . toBe ( 'projectPath/src/background.js' )
314
+ expect ( mainConfig . entry . index [ 0 ] ) . toBe ( 'projectPath/src/background.js' )
315
315
} )
316
316
317
317
test ( 'custom background file is used if provided' , async ( ) => {
@@ -325,9 +325,7 @@ describe('electron:serve', () => {
325
325
326
326
const mainConfig = webpack . mock . calls [ 0 ] [ 0 ]
327
327
// Proper entry file is used
328
- expect ( mainConfig . entry . background [ 0 ] ) . toBe (
329
- 'projectPath/customBackground.js'
330
- )
328
+ expect ( mainConfig . entry . index [ 0 ] ) . toBe ( 'projectPath/customBackground.js' )
331
329
} )
332
330
333
331
test ( 'custom output dir is used if set in vue.config.js' , async ( ) => {
Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ function bundleMain ({
427
427
config . output
428
428
. path ( api . resolve ( outputDir + ( isBuild ? '/bundled' : '' ) ) )
429
429
// Electron will not detect background.js on dev server, only index.js
430
- . filename ( isBuild ? 'background.js' : 'index .js')
430
+ . filename ( '[name] .js')
431
431
if ( isBuild ) {
432
432
// Set __static to __dirname (files in public get copied here)
433
433
config
@@ -465,7 +465,9 @@ function bundleMain ({
465
465
}
466
466
] )
467
467
}
468
- config . entry ( 'background' ) . add ( api . resolve ( mainProcessFile ) )
468
+ config
469
+ . entry ( isBuild ? 'background' : 'index' )
470
+ . add ( api . resolve ( mainProcessFile ) )
469
471
if ( usesTypescript ) {
470
472
config . resolve . extensions . merge ( [ '.js' , '.ts' ] )
471
473
config . module
You can’t perform that action at this time.
0 commit comments