JSPM

  • Created
  • Published
  • Downloads 298418
  • Score
    100M100P100Q183371F
  • License MIT

Bundler agnostic HMR utils for Svelte 3

Package Exports

  • svelte-hmr
  • svelte-hmr/runtime

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svelte-hmr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

svelte-hmr

HMR common utils for Svelte 3.

This project only provides shared primitives for implementing Svelte HMR in any bundler, it does nothing useful on its own. If you are really developing a bundler adapter / plugin... Sorry, no docs for now! Drop me a line, I'd be happy to help! You can create an issue here, or contact me directly in Svelte's Discord channel.

If what you're after is to add HMR to your Svelte project, you'll find the relevant tools and information in the following projects.

Rollup / Nollup

HMR support for Rollup

Rollup does not natively support HMR. You'll need to use one of the following solution. The best way to get started is to refer to svelte-template-hot, that demonstrates usage of both.

Webpack

Documentation & examples for Webpack are currently lagging behind...

Sapper

Sapper can be supported with Webpack's loader. The link bellow is still very much a work in progress (no docs at time of writting), but I'm adding it for future reference.

Svelte Native

The official Svelte Native template already includes HMR support.