Skip to content

Commit 67c95e6

Browse files
authored
feat(ui/serve): add --no-sandbox option (#732)
1 parent 6629c86 commit 67c95e6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ui.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ module.exports = api => {
3939
api.describeTask({
4040
match: /vue-cli-service electron:serve/,
4141
description: 'Serve your app, launch electron',
42-
link: 'https://nklayman.github.io/vue-cli-plugin-electron-builder/'
42+
link: 'https://nklayman.github.io/vue-cli-plugin-electron-builder/',
43+
prompts: [
44+
{
45+
name: 'noSandbox',
46+
type: 'confirm',
47+
default: false,
48+
description: 'Disable sandbox (--no-sandbox)',
49+
link: 'https://github.com/electron/electron/issues/18265'
50+
}
51+
],
52+
onBeforeRun: ({ answers, args }) => {
53+
// Args
54+
if (answers.noSandbox) args.push('--no-sandbox')
55+
}
56+
4357
})
4458
}

0 commit comments

Comments
 (0)