workers-sdk
workers-sdk copied to clipboard
🐛 BUG: `wrangler dev` is not auto-reloading a custom build when files change
What version of Wrangler
are you using?
2.0.23
What operating system are you using?
Mac
Describe the Bug
I have a wrangler.toml file that looks like the following
name = "js"
account_id = "<redacted>"
workers_dev = true
main="./dist/main.js"
[build]
command = 'yarn build'
The yarn build just runs webpack.
When I run the worker using wrangler dev
(tried in both local and not-local mode) then the build command is run the first time and the server starts up, but any changes to my local source files do not trigger a rebuild of the worker.
I have also tried configuring the [build]
settings like this:
[build]
command = 'yarn build'
cwd = './'
watch_dir = './'
which also does not work. Is there something I'm configuring wrong, or is the functionality broken in some way?
This should definitely work. What is the layout of your source files? Would you be able to set up a small reproduction of the problem to share with us?
Closing as inactive/needs reproduction