@@ -37,6 +37,9 @@ module.exports = (api, options) => {
37
37
pluginOptions . bundleMainProcess == null
38
38
? true
39
39
: pluginOptions . bundleMainProcess
40
+ if ( pluginOptions . experimentalNativeDepCheck ) {
41
+ process . env . VCPEB_EXPERIMENTAL_NATIVE_DEP_CHECK = true
42
+ }
40
43
41
44
const removeArg = ( arg , count , rawArgs ) => {
42
45
const index = rawArgs . indexOf ( arg )
@@ -61,9 +64,6 @@ module.exports = (api, options) => {
61
64
async ( args , rawArgs ) => {
62
65
// Use custom config for webpack
63
66
process . env . IS_ELECTRON = true
64
- if ( args . experimentalNativeDepCheck ) {
65
- process . env . VCPEB_EXPERIMENTAL_NATIVE_DEP_CHECK = true
66
- }
67
67
const builder = require ( 'electron-builder' )
68
68
const yargs = require ( 'yargs' )
69
69
// Import the yargs options from electron-builder
@@ -77,7 +77,6 @@ module.exports = (api, options) => {
77
77
removeArg ( '--skipBundle' , 1 , rawArgs )
78
78
removeArg ( '--report' , 1 , rawArgs )
79
79
removeArg ( '--report-json' , 1 , rawArgs )
80
- removeArg ( '--experimentalNativeDepCheck' , 1 , rawArgs )
81
80
// Parse the raw arguments using electron-builder yargs config
82
81
const builderArgs = yargs
83
82
. command ( [ 'build' , '*' ] , 'Build' , configureBuildCommand )
@@ -265,9 +264,6 @@ module.exports = (api, options) => {
265
264
async ( args , rawArgs ) => {
266
265
// Use custom config for webpack
267
266
process . env . IS_ELECTRON = true
268
- if ( args . experimentalNativeDepCheck ) {
269
- process . env . VCPEB_EXPERIMENTAL_NATIVE_DEP_CHECK = true
270
- }
271
267
const execa = require ( 'execa' )
272
268
const preload = pluginOptions . preload || { }
273
269
const mainProcessWatch = [
@@ -282,7 +278,6 @@ module.exports = (api, options) => {
282
278
removeArg ( '--debug' , 1 , rawArgs )
283
279
removeArg ( '--headless' , 1 , rawArgs )
284
280
removeArg ( '--https' , 1 , rawArgs )
285
- removeArg ( '--experimentalNativeDepCheck' , 1 , rawArgs )
286
281
287
282
// Run the serve command
288
283
const server = await api . service . run ( 'serve' , {
0 commit comments