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

fix: set default value for option.optimistic to false #53

Merged
merged 1 commit into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/spotty-garlics-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-hmr': patch
---

change options.optimistic default value from true to false to fix buggy behavior on fatal runtime errors
3 changes: 2 additions & 1 deletion packages/svelte-hmr/lib/make-hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const defaultHotOptions = {
// don't reload on fatal error
noReload: false,
// try to recover after runtime errors during component init
optimistic: true,
// defaults to false because some runtime errors are fatal and require a full reload
optimistic: false,
// auto accept modules of components that have named exports (i.e. exports
// from context="module")
acceptNamedExports: true,
Expand Down