File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ module.exports = (api, options) => {
7
7
? options . pluginOptions . electronBuilder
8
8
: { }
9
9
const outputDir = pluginOptions . outputDir || 'dist_electron'
10
+ const backgroundFile = pluginOptions . backgroundFile || 'src/background.js'
10
11
api . registerCommand (
11
12
'build:electron' ,
12
13
{
@@ -52,7 +53,7 @@ module.exports = (api, options) => {
52
53
mainConfig
53
54
. plugin ( 'env' )
54
55
. use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'production' } ] )
55
- mainConfig . entry ( 'background' ) . add ( api . resolve ( './src/background.js' ) )
56
+ mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
56
57
57
58
console . log ( 'Bundling render process:' )
58
59
rendererConfig . target ( 'electron-renderer' ) . output . publicPath ( './' )
@@ -142,7 +143,7 @@ module.exports = (api, options) => {
142
143
mainConfig
143
144
. plugin ( 'env' )
144
145
. use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'development' } ] )
145
- mainConfig . entry ( 'background' ) . add ( api . resolve ( './src/background.js' ) )
146
+ mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
146
147
const bundle = webpack ( mainConfig . toConfig ( ) )
147
148
148
149
console . log ( 'Bundling main process:\n' )
You can’t perform that action at this time.
0 commit comments