Skip to content

chore: marked package as free of side-effects#81

Merged
Rich-Harris merged 1 commit into
sveltejs:masterfrom
GauBen:patch-1
Sep 25, 2024
Merged

chore: marked package as free of side-effects#81
Rich-Harris merged 1 commit into
sveltejs:masterfrom
GauBen:patch-1

Conversation

@GauBen

@GauBen GauBen commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

Hey!

I noticed a bare import to devalue in svelte-kit SSR output: (.svelte-kit/output/server/chunks/client.js)

import "./exports.js";
import "devalue";
function get(key, parse = JSON.parse) {
  try {
    return parse(sessionStorage[key]);
  } catch {
  }
}
const SNAPSHOT_KEY = "sveltekit:snapshot";
const SCROLL_KEY = "sveltekit:scroll";
get(SCROLL_KEY) ?? {};
get(SNAPSHOT_KEY) ?? {};

This directive will ensure that this bare import is removed during the build

@Rich-Harris Rich-Harris merged commit 566b961 into sveltejs:master Sep 25, 2024
@Rich-Harris

Copy link
Copy Markdown
Member

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants