Skip to content

HMR reorders content #6506

Closed
sveltejs/vite-plugin-svelte
#82
@danawoodman

Description

@danawoodman

Describe the bug
When saving a component in the latest version of Kit.

Screen Recording 2021-07-01 at 01 49 13 PM

To Reproduce

Repro repo:
https://github.com/danawoodman/sveltekit-content-jump-bug/tree/main

npm init svelte@next foo
cd foo
npm i
npm run dev

Then create a file with a few components, change a component and watch it jump to the bottom.

Expected behavior
Should reload without content jumping around.

Information about your SvelteKit Installation:

Diagnostics
  System:
    OS: macOS 11.2
    CPU: (8) arm64 Apple M1
    Memory: 98.31 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.3.0 - /var/folders/j4/3_1h9_mn6w5g4p438nym2vl40000gn/T/fnm_multishells/74212_1625170227411/bin/node
    npm: 7.15.1 - /var/folders/j4/3_1h9_mn6w5g4p438nym2vl40000gn/T/fnm_multishells/74212_1625170227411/bin/npm
  Browsers:
    Brave Browser: 91.1.25.73
    Chrome: 91.0.4472.114
    Safari: 14.0.3
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.119 
    svelte: ^3.34.0 => 3.38.3 
  • Browser: Brave, Safari (not browser related AFAIK)

Severity
This really messes up local development since you'll need to reload every time to get the proper layout to show up.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions