Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nitpick: Assume -w when --build-watch-path has been set #8

Merged
merged 1 commit into from
Jul 18, 2021
Merged

Nitpick: Assume -w when --build-watch-path has been set #8

merged 1 commit into from
Jul 18, 2021

Conversation

evanderkoogh
Copy link
Contributor

This is an absolutely incredibly well done local testbed for Workers. I got it working on a Typescript Durable Object project with an install and a run command. Well done!

My only gripe so far has been that I had set only --build-watch-path, but I also had to set -w to get it to reload. This PR should fix that :)

@mrbbot
Copy link
Contributor

mrbbot commented Jul 9, 2021

👋 Thanks for raising this. This PR definitely fixes that for the CLI, however I think the best place for this to live would be in OptionsProcessor around here: https://github.com/mrbbot/miniflare/blob/84139a2b5b4d264288a607ec3887cda98f210612/src/options/processor.ts#L269 That way setting build watch path in the CLI, wrangler.toml or via the API would set the watch option too.

@mrbbot mrbbot closed this in e4bc0f5 Jul 18, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Jul 18, 2021

I've gone ahead and implemented this. It'll be in the next release. 👍

mrbbot added a commit that referenced this pull request Jul 18, 2021
@mrbbot mrbbot reopened this Jul 18, 2021
@mrbbot mrbbot merged commit 1642e7c into cloudflare:master Jul 18, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Jul 18, 2021

Thinking about this a bit more whilst updating the documentation, I think you're right that this should be CLI only 😄. Having this behaviour for wrangler.toml files and the API would lead to unexpected behaviour, especially since users would need to call dispose to clean up the watcher if Miniflare found a build command in wrangler.toml (since build watch path would default to src if this was the case).

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 26, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c13559
Status: ✅  Deploy successful!
Preview URL: https://f1fe4fce.cf-miniflare.pages.dev

View logs

@mrbbot
Copy link
Contributor

mrbbot commented May 26, 2022

Better late than never 😅

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.

2 participants