File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ module.exports = (api, options) => {
14
14
const mainProcessFile =
15
15
pluginOptions . mainProcessFile ||
16
16
( usesTypescript ? 'src/background.ts' : 'src/background.js' )
17
+ const mainProcessChain =
18
+ pluginOptions . chainWebpackMainProcess || ( config => config )
17
19
api . registerCommand (
18
20
'build:electron' ,
19
21
{
@@ -85,7 +87,7 @@ module.exports = (api, options) => {
85
87
api . resolve ( outputDir + '/bundled/css/fonts' )
86
88
)
87
89
}
88
- const bundle = webpack ( mainConfig . toConfig ( ) )
90
+ const bundle = webpack ( mainProcessChain ( mainConfig ) . toConfig ( ) )
89
91
console . log ( 'Bundling main process:\n' )
90
92
bundle . run ( ( err , stats ) => {
91
93
if ( err ) {
@@ -169,7 +171,7 @@ module.exports = (api, options) => {
169
171
. options ( { transpileOnly : ! mainProcessTypeChecking } )
170
172
}
171
173
172
- const bundle = webpack ( mainConfig . toConfig ( ) )
174
+ const bundle = webpack ( mainProcessChain ( mainConfig ) . toConfig ( ) )
173
175
174
176
console . log ( 'Bundling main process:\n' )
175
177
bundle . run ( ( err , stats ) => {
You can’t perform that action at this time.
0 commit comments