wails icon indicating copy to clipboard operation
wails copied to clipboard

Wails dev mode do not compile front-end command line options

Open BigCatGit opened this issue 4 years ago • 7 comments

Is your feature request related to a problem? Please describe.

Can wails add a function command option that the development mode does not automatically compile the front end? This can speed up the test speed of go. It takes a long time for the wails dev department to recompile the front end every time

Describe the solution you'd like

demo: wails dev --without-build-frontend

Describe alternatives you've considered

No response

Additional context

No response

BigCatGit avatar Jul 20 '22 14:07 BigCatGit

A quick fix to doing this while not using the CLI would be by removing the npm install and build options from your wails.json file. This should make Wails skip the install and build process.

For refrence to which lines in the wails.json file:

"frontend:install": "npm install",
"frontend:build": "npm run build",

allcapsc avatar Jul 20 '22 22:07 allcapsc

It may be that I didn't express it clearly. I mean that if you can start and test the go code every time through the command line, you can run it without compiling the front end. This operation is more convenient in frequent go end tests. Of course, you can also use the unit test of go instead

BigCatGit avatar Jul 21 '22 09:07 BigCatGit

image wails build -s

asppj avatar Jul 21 '22 09:07 asppj

Oh, thank you. I didn't see this option in wails --help

~/Desktop/test > wails --help Wails CLI v2.0.0-beta.39.2

Available commands:

build Builds the application init Initialise a new Wails project doctor Diagnose your environment dev Development mode generate Code Generation Tools update Update the Wails CLI version The Wails CLI version

Flags:

-help Get help on the 'wails' command.

BigCatGit avatar Jul 21 '22 09:07 BigCatGit

Please try the above PR to see if this fixes your problem. If you are unsure how to do this, please follow this guide. Let us know how you get on 👍

leaanthony avatar Jul 21 '22 09:07 leaanthony

Yes, I mean adding wails dev -s support. PR I tried it and didn't know how to test it, just follow in https://github.com/wailsapp/wails/pull/1632

BigCatGit avatar Jul 21 '22 10:07 BigCatGit

I linked the guide on how to test 👍

leaanthony avatar Jul 21 '22 10:07 leaanthony