{"id":13722485,"url":"https://github.com/rixo/svelte-template-hot","last_synced_at":"2025-07-22T14:36:10.758Z","repository":{"id":147724062,"uuid":"213763969","full_name":"rixo/svelte-template-hot","owner":"rixo","description":"Copy of official Svelte template with added HMR support","archived":false,"fork":false,"pushed_at":"2024-05-15T19:10:57.000Z","size":378,"stargazers_count":61,"open_issues_count":9,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T03:39:29.591Z","etag":null,"topics":["hmr","hot-module-replacement","rollup","rollup-hmr","svelte","svelte-template","svelte-v3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rixo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-08T22:01:59.000Z","updated_at":"2024-01-07T18:04:04.000Z","dependencies_parsed_at":"2024-11-10T16:51:18.731Z","dependency_job_id":null,"html_url":"https://github.com/rixo/svelte-template-hot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rixo/svelte-template-hot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fsvelte-template-hot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fsvelte-template-hot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fsvelte-template-hot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fsvelte-template-hot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixo","download_url":"https://codeload.github.com/rixo/svelte-template-hot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fsvelte-template-hot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266510811,"owners_count":23940715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hmr","hot-module-replacement","rollup","rollup-hmr","svelte","svelte-template","svelte-v3"],"created_at":"2024-08-03T01:01:29.364Z","updated_at":"2025-07-22T14:36:10.734Z","avatar_url":"https://github.com/rixo.png","language":"JavaScript","funding_links":[],"categories":["templates"],"sub_categories":["editor tools"],"readme":"# Svelte Template Hot\n\nThis is a copy of official [Svelte template](https://github.com/sveltejs/template) with added HMR support. It lives at https://github.com/rixo/svelte-template-hot.\n\nThis template aims to remain as close to the official template as possible. Please refer to official docs for general usage. For HMR specific stuff, see bellow.\n\n**:warning: Experimental :warning:**\n\nThis HMR implementation relies on Svelte's private \u0026 non documented API. This means that it can stop working with any new version of Svelte.\n\nProgress of Svelte HMR support can be tracked in [this issue](https://github.com/sveltejs/svelte/issues/3632).\n\n**Update 2020-02-24** We're [making progress](https://github.com/sveltejs/svelte/pull/3822) :)\n\n**NOTE** This template pins the minor version of Svelte in `package.json`, using the [tilde comparator](https://docs.npmjs.com/misc/semver#tilde-ranges-123-12-1) because, in practice, HMR breakages tend to only happen with new minor versions of Svelte (not patch). And I don't want people to download a hot template with broken HMR... But, in your app, you can change this to your liking -- because you might be more interested in last version of Svelte than stable HMR, or be wise and pin the exact versions of all you dependencies.\n\n## Installation\n\nTo create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):\n\n```bash\nnpx degit rixo/svelte-template-hot svelte-app\ncd svelte-app\nnpm install\n```\n\nRun the build script a first time, in order to avoid 404 errors about missing `bundle.css` in the browser:\n\n```bash\nnpm run build\n```\n\n## Quick start\n\n```bash\nnpm run dev\n```\n\nNavigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and... Eyeball!\n\n## Usage\n\nHMR is supported both with [Nollup](https://github.com/PepsRyuu/nollup) or with Rollup itself with (very experimental) [rollup-plugin-hot](https://github.com/rixo/rollup-plugin-hot).\n\nNollup implements the shortest possible path from a file change to the module reloaded in the browser and is all in-memory. Said otherwise, it is insanely fast. Also, it has been around for some time so it is quite battle tested already.\n\nThe Rollup plugin on the other hand is still little more than a proof of concept by now, but it has better sourcemap support and error reporting (according to my own tastes at least).\n\nSupport for both Nollup and Rollup HMR is provided by [rollup-plugin-svelte-hot](https://github.com/rixo/rollup-plugin-svelte-hot). Please report issues regarding HMR in [this plugin's tracker](https://github.com/rixo/rollup-plugin-svelte-hot/issues). Or [this template's project](https://github.com/rixo/svelte-template-hot/issues) might make more sense. You be the judge.\n\n### Start HMR server with Nollup\n\n```bash\nnpm run dev:nollup\n```\n\n### Start Rollup with HMR support\n\n```bash\nnpm run dev:rollup\n```\n\n### Start with LiveReload (no HMR)\n\nThis is the default `dev` of official template.\n\n```bash\nnpm run dev:livereload\n```\n\n### Start with default method\n\nNollup HMR is also aliased as `dev` so you can simply run:\n\n```bash\nnpm run dev\n```\n\nYou can change the default `dev` script to your preferred method in the `scripts` section of `package.json`.\n\n**2020-06-29** Nollup has been made the default `dev` script (instead of Rollup) because just released Nollup 0.12.0 fixes support for Svelte sourcemaps and dynamic imports, and Nollup is monstrously fast (especially on the most important metrics, that is rebuild time in big projects)!\n\nThe suggested workflow is to use Nollup for dev and enjoy instant feedback loop. If you need a plugin that doesn't work with Nollup, or if you are in a situation that Nollup makes harder to debug (mainly because of it running your code through eval), you can fallback on `npm run dev:rollup` (HMR with rollup-plugin-hot). If you have a bug that you suspect might be caused by HMR or HMR code transform, confirm by turning back to `npm run dev:livereload`.\n\n### Build\n\n```bash\nnpm run build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fsvelte-template-hot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixo%2Fsvelte-template-hot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fsvelte-template-hot/lists"}