Skip to content

Commit

Permalink
fix: onBundleStart dependency array (#6116)
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIdeas authored Jun 24, 2024
1 parent e8997b8 commit ff0b5b2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,12 @@ function DevSession(props: DevSessionProps) {
]);

const onBundleStart = useCallback(() => {
// NOTE: this callback won't be called if props.experimentalDevEnv
devEnv.proxy.onBundleStart({
type: "bundleStart",
config: startDevWorkerOptions,
});
if (!props.experimentalDevEnv) {
devEnv.proxy.onBundleStart({
type: "bundleStart",
config: startDevWorkerOptions,
});
}
}, [devEnv, startDevWorkerOptions, props.experimentalDevEnv]);
const onBundleComplete = useCallback(
(bundle: EsbuildBundle) => {
Expand Down

0 comments on commit ff0b5b2

Please sign in to comment.