@@ -6,13 +6,13 @@ module.exports = (api, options) => {
66 options . pluginOptions && options . pluginOptions . electronBuilder
77 ? options . pluginOptions . electronBuilder
88 : { }
9- const usesTypescript = pluginOptions . disableBackgroundTypescript
9+ const usesTypescript = pluginOptions . disableMainProcessTypescript
1010 ? false
1111 : api . hasPlugin ( 'typescript' )
12- const backgroundTypeChecking = pluginOptions . backgroundTypeChecking || false
12+ const mainProcessTypeChecking = pluginOptions . mainProcessTypeChecking || false
1313 const outputDir = pluginOptions . outputDir || 'dist_electron'
14- const backgroundFile =
15- pluginOptions . backgroundFile ||
14+ const mainProcessFile =
15+ pluginOptions . mainProcessFile ||
1616 ( usesTypescript ? 'src/background.ts' : 'src/background.js' )
1717 api . registerCommand (
1818 'build:electron' ,
@@ -59,15 +59,15 @@ module.exports = (api, options) => {
5959 mainConfig
6060 . plugin ( 'env' )
6161 . use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'production' } ] )
62- mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
62+ mainConfig . entry ( 'background' ) . add ( api . resolve ( mainProcessFile ) )
6363 if ( usesTypescript ) {
6464 mainConfig . resolve . extensions . merge ( [ '.ts' ] )
6565 mainConfig . module
6666 . rule ( 'ts' )
6767 . test ( / \. t s $ / )
6868 . use ( 'ts-loader' )
6969 . loader ( 'ts-loader' )
70- . options ( { transpileOnly : ! backgroundTypeChecking } )
70+ . options ( { transpileOnly : ! mainProcessTypeChecking } )
7171 }
7272
7373 console . log ( 'Bundling render process:' )
@@ -158,15 +158,15 @@ module.exports = (api, options) => {
158158 mainConfig
159159 . plugin ( 'env' )
160160 . use ( webpack . EnvironmentPlugin , [ { NODE_ENV : 'development' } ] )
161- mainConfig . entry ( 'background' ) . add ( api . resolve ( backgroundFile ) )
161+ mainConfig . entry ( 'background' ) . add ( api . resolve ( mainProcessFile ) )
162162 if ( usesTypescript ) {
163163 mainConfig . resolve . extensions . merge ( [ '.ts' ] )
164164 mainConfig . module
165165 . rule ( 'ts' )
166166 . test ( / \. t s $ / )
167167 . use ( 'ts-loader' )
168168 . loader ( 'ts-loader' )
169- . options ( { transpileOnly : ! backgroundTypeChecking } )
169+ . options ( { transpileOnly : ! mainProcessTypeChecking } )
170170 }
171171
172172 const bundle = webpack ( mainConfig . toConfig ( ) )
0 commit comments