Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: upgrade `miniflare` to `2.0.0` * fix: remove redundant immediate `pages dev` rebuilds/reloads Watching `all` events without `ignoreInitial` set to `true` means `chokidar` will call the callback immediately. This caused functions to be built twice, and Miniflare to be `reload`ed immediately after startup. * fix: wait for `esbuild` to finish before starting Miniflare Instead of using a `scriptReady` boolean, this now uses a deferred `Promise`, so the event loop isn't blocked. This is `await`ed before constructing the `new Miniflare`, as this will asynchronously kick off loading the script. * fix: undefined fallback fetch on watch update with `pages dev` Subsequent Pages Functions worker builds due to file changes were not replacing `__FALLBACK_SERVICE_FETCH__` leading to `ReferenceError`s. This change switches to using `esbuild`'s built-in `define` option, instead of `esbuild-plugin-replace`, removing an additional dependency.
- Loading branch information