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) => {
77 ? options . pluginOptions . electronBuilder
88 : { }
99 const outputDir = pluginOptions . outputDir || 'dist_electron'
10+ const backgroundFile = pluginOptions . backgroundFile || 'src/background.js'
1011 api . registerCommand (
1112 'build:electron' ,
1213 {
@@ -52,7 +53,7 @@ module.exports = (api, options) => {
5253 mainConfig
5354 . plugin ( 'env' )
5455 . use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'production' } ] )
55- mainConfig . entry ( 'background' ) . add ( api . resolve ( './src/background.js' ) )
56+ mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
5657
5758 console . log ( 'Bundling render process:' )
5859 rendererConfig . target ( 'electron-renderer' ) . output . publicPath ( './' )
@@ -142,7 +143,7 @@ module.exports = (api, options) => {
142143 mainConfig
143144 . plugin ( 'env' )
144145 . use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'development' } ] )
145- mainConfig . entry ( 'background' ) . add ( api . resolve ( './src/background.js' ) )
146+ mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
146147 const bundle = webpack ( mainConfig . toConfig ( ) )
147148
148149 console . log ( 'Bundling main process:\n' )
You can’t perform that action at this time.
0 commit comments