File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 97
97
process . env . NO_SANDBOX = '1'
98
98
}
99
99
100
+ if ( options [ '--' ] ) {
101
+ process . env . ELECTRON_CLI_ARGS = JSON . stringify ( options [ '--' ] ) ;
102
+ }
103
+
100
104
if ( options . entry ) {
101
105
process . env . ELECTRON_ENTRY = options . entry
102
106
}
151
155
process . env . ELECTRON_ENTRY = options . entry
152
156
}
153
157
158
+ if ( options [ '--' ] ) {
159
+ process . env . ELECTRON_CLI_ARGS = JSON . stringify ( options [ '--' ] ) ;
160
+ }
161
+
154
162
try {
155
163
await preview ( inlineConfig , { skipBuild : options . skipBuild } )
156
164
} catch ( e ) {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export function startElectron(root: string | undefined): ChildProcess {
125
125
126
126
const isDev = process . env . NODE_ENV_ELECTRON_VITE === 'development'
127
127
128
- const args : string [ ] = [ ]
128
+ const args : string [ ] = process . env . ELECTRON_CLI_ARGS ? JSON . parse ( process . env . ELECTRON_CLI_ARGS ) : [ ]
129
129
130
130
if ( ! ! process . env . REMOTE_DEBUGGING_PORT && isDev ) {
131
131
args . push ( `--remote-debugging-port=${ process . env . REMOTE_DEBUGGING_PORT } ` )
You can’t perform that action at this time.
0 commit comments