Skip to content

Commit

Permalink
bump svelte-hmr (restore auto accept accessors & named exports -- fix…
Browse files Browse the repository at this point in the history
… sapper)
  • Loading branch information
rixo committed Feb 28, 2020
1 parent ecaa242 commit 7367022
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,15 @@ module.exports = {

// --- Advanced ---

// By default, components compiled with accessors or that have named
// exports (i.e. exports from <script context="module">) don't have HMR
// accept handlers registered. This means that, when those components
// change, the update will bubble to all their consumers (i.e. modules
// that import them). Without this, changes to named exports / publicly
// accessible props wouldn't be reflected in parent modules. These two
// options allow to force accept handlers for those modules.
//
// Note, in particular, that if you set the `accessors` compile option
// globally, you'll have to set `acceptAccessors` to true, otherwise no
// component will ever be updated through HMR -- instead the updates
// would all bubble all the way up to the root non Svelte JS file...
//
acceptAccessors: false,
acceptNamedExports: false,
// Prevent adding an HMR accept handler to components with
// accessors option to true, or to components with named exports
// (from <script context="module">). This have the effect of
// recreating the consumer of those components, instead of the
// component themselves, on HMR updates. This might be needed to
// reflect changes to accessors / named exports in the parents,
// depending on how you use them.
acceptAccessors: true,
acceptNamedExports: true,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"loader-utils": "^1.1.0",
"svelte-dev-helper": "^1.1.9",
"svelte-hmr": "^0.3.1"
"svelte-hmr": "^0.5.0"
},
"devDependencies": {
"chai": "^4.1.2",
Expand All @@ -36,7 +36,7 @@
"mocha": "^5.2.0",
"sinon": "^6.1.5",
"sinon-chai": "^3.2.0",
"svelte": "3.12"
"svelte": "^3.19.1"
},
"peerDependencies": {
"svelte": ">1.44.0"
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,13 @@ svelte-dev-helper@^1.1.9:
version "1.1.9"
resolved "https://registry.yarnpkg.com/svelte-dev-helper/-/svelte-dev-helper-1.1.9.tgz#7d187db5c6cdbbd64d75a32f91b8998bde3273c3"

svelte-hmr@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.3.1.tgz#a4092afe0e0b993869dbaaabac5722ef9e2967db"
svelte-hmr@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.5.0.tgz#7fbea074691a117474dfd96bb352c4fdbc418007"

svelte@3.12:
version "3.12.1"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.12.1.tgz#ddfacd43272ac3255907c682b74ee7d3d8b06b0c"
svelte@^3.19.1:
version "3.19.1"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.19.1.tgz#2455e443f8ca67b98f3b7eb58285eaeb8af0c4b9"

table@^5.2.3:
version "5.4.6"
Expand Down

0 comments on commit 7367022

Please sign in to comment.