nuxtron
nuxtron copied to clipboard
How to pass additional arguments to electron-builder?
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?
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.