Skip to content

Add -s support for wails dev#1632

Merged
leaanthony merged 3 commits into
masterfrom
feature/skip-frontend-build-dev
Jul 24, 2022
Merged

Add -s support for wails dev#1632
leaanthony merged 3 commits into
masterfrom
feature/skip-frontend-build-dev

Conversation

@leaanthony
Copy link
Copy Markdown
Member

Fixes #1623

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jul 21, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2482091
Status:⚡️  Build in progress...

View logs

@stffabi
Copy link
Copy Markdown
Contributor

stffabi commented Jul 21, 2022

Just crossed my mind, couldn't we skip building the frontend in dev mode if we use an external dev server?

Since #1615 we install all dependencies for the frontend/devserver outside of the build. So we could always skip building the frontend in that case, since we only proxy to the external dev server.

@leaanthony
Copy link
Copy Markdown
Member Author

leaanthony commented Jul 21, 2022

That's a valid point. I think we should keep this flag for when someone doesn't use a Dev server but we should skip when they do 👍

@stffabi
Copy link
Copy Markdown
Contributor

stffabi commented Jul 21, 2022

Yeah, absolutely.

@leaanthony
Copy link
Copy Markdown
Member Author

@stffabi - looks like you added this scenario in March: https://github.com/wailsapp/wails/blob/master/v2/cmd/wails/internal/commands/dev/dev.go#L689-L691

If you're happy this covers that scenario then I think this is ready for merging 👍

@stffabi
Copy link
Copy Markdown
Contributor

stffabi commented Jul 24, 2022

@stffabi - looks like you added this scenario in March: https://github.com/wailsapp/wails/blob/master/v2/cmd/wails/internal/commands/dev/dev.go#L689-L691

That will only skip triggering a reload of the frontend when frontend files get changed. It won't prevent building the frontend when a rebuild due to changed go files is triggered.

I think the following should do what we want:

- IgnoreFrontend: false,
+ IgnoreFrontend: flags.skipFrontend || flags.frontendDevServerURL != "",

@leaanthony
Copy link
Copy Markdown
Member Author

Perfect! I'll get that in tonight.

@leaanthony leaanthony merged commit 7b656c4 into master Jul 24, 2022
@leaanthony leaanthony deleted the feature/skip-frontend-build-dev branch July 24, 2022 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants