@@ -71,8 +71,8 @@ module.exports = (api, options) => {
71
71
const builder = require ( 'electron-builder' )
72
72
const yargs = require ( 'yargs' )
73
73
// Import the yargs options from electron-builder
74
- const configureBuildCommand = require ( 'electron-builder/out/builder' )
75
- . configureBuildCommand
74
+ const configureBuildCommand =
75
+ require ( 'electron-builder/out/builder' ) . configureBuildCommand
76
76
// Prevent custom args from interfering with electron-builder
77
77
removeArg ( '--mode' , 2 , rawArgs )
78
78
removeArg ( '--dest' , 2 , rawArgs )
@@ -537,46 +537,6 @@ module.exports = (api, options) => {
537
537
}
538
538
}
539
539
)
540
-
541
- api . registerCommand (
542
- 'build:electron' ,
543
- {
544
- description :
545
- '[deprecated, use electron:build instead] build app with electron-builder' ,
546
- usage : 'vue-cli-service build:electron [electron-builder options]' ,
547
- details :
548
- 'All electron-builder command line options are supported.\n' +
549
- 'See https://www.electron.build/cli for cli options\n' +
550
- 'See https://nklayman.github.io/vue-cli-plugin-electron-builder/ for more details about this plugin.'
551
- } ,
552
- ( args , rawArgs ) => {
553
- warn ( 'This command is deprecated. Please use electron:build instead.' )
554
- return api . service . run (
555
- 'electron:build' ,
556
- { ...args , _ : [ 'First arg is removed' , ...args . _ ] } ,
557
- [ 'First arg is removed' , ...rawArgs ]
558
- )
559
- }
560
- )
561
-
562
- api . registerCommand (
563
- 'serve:electron' ,
564
- {
565
- description :
566
- '[deprecated, use electron:serve instead] serve app and launch electron' ,
567
- usage : 'vue-cli-service serve:electron' ,
568
- details :
569
- 'See https://nklayman.github.io/vue-cli-plugin-electron-builder/ for more details about this plugin.'
570
- } ,
571
- ( args , rawArgs ) => {
572
- warn ( 'This command is deprecated. Please use electron:serve instead.' )
573
- return api . service . run (
574
- 'electron:serve' ,
575
- { ...args , _ : [ 'First arg is removed' , ...args . _ ] } ,
576
- [ 'First arg is removed' , ...rawArgs ]
577
- )
578
- }
579
- )
580
540
}
581
541
582
542
function bundleMain ( {
@@ -594,10 +554,7 @@ function bundleMain ({
594
554
const isBuild = mode === 'build'
595
555
const NODE_ENV = process . env . NODE_ENV
596
556
const config = new Config ( )
597
- config
598
- . mode ( NODE_ENV )
599
- . node . set ( '__dirname' , false )
600
- . set ( '__filename' , false )
557
+ config . mode ( NODE_ENV ) . node . set ( '__dirname' , false ) . set ( '__filename' , false )
601
558
// Set externals
602
559
config . externals ( getExternals ( api , pluginOptions ) )
603
560
0 commit comments