Skip to content

How to customize the tauri dev/build command #4964

Answered by FabianLars
joe20182 asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, this is not directly possible, but you can workaround it;
I think the easiest way would be to not use beforeDevCommand at all, and instead do it inside the package.json scripts via https://www.npmjs.com/package/concurrently or https://www.npmjs.com/package/npm-run-all.

Alternatively you can create a second tauri config which looks like this

{
  "build": {
    "beforeDevCommand": "yarn dev --mode staging"
  }
}

And invoke it by using something like yarn tauri dev -c staging.json.

As a last resort you could just run the commands in 2 different terminals.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joe20182
Comment options

Answer selected by joe20182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants