nuxtron icon indicating copy to clipboard operation
nuxtron copied to clipboard

How to pass additional arguments to electron-builder?

Open Patrick-Remy opened this issue 2 years ago • 1 comments

This package does have a fixed list of properties that can be passed on nuxtron build (config file, platforms, archs). But first there are much more arguments electron-builder supports, and second I want to override single electron-builder configuration options for different scripts, without creating a full new electron-builder config.

Would it be possible to support something like -- -arg1 that will be passed to electron-builder?

Patrick-Remy avatar Nov 17 '21 10:11 Patrick-Remy

As a workaround, you can replace nuxtron build with a custom npm script

"scripts": {
    "build": "npm run build:clean && npm run build:renderer && npm run build:background",
    "build:clean": "rm -rf app dist renderer/.nuxt",
    "build:renderer": "nuxt build renderer && nuxt generate renderer && mv renderer/dist app",
    "build:background": "node node_modules/nuxtron/bin/webpack/build.production.js",
    "pack":" electron-builder  --your-custom-electron-args"
}

Note that the paths are the default values, you probably need to replace them with those you configured in nuxtron config file.

Patrick-Remy avatar Nov 18 '21 09:11 Patrick-Remy