question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Self-closing tags (in __layout.svelte) are ruined

See original GitHub issue

Hi!

When I start from sveltekit-electron In __layout.svelte construcion


<div class="dragbar" />

{#if ready}
	<slot />
{/if}
<style>.foo{}</style>

is changed to

<div class="dragbar">

{#if ready}
	<slot>
{/if}
<style>.foo{}</style>
</slot></div>
<slot></slot>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
manuel3108commented, Oct 2, 2021

I don’t know how (or if) you can stringify the AST this creates back to HTMLX.

According to https://github.com/sveltejs/svelte/issues/2914 this wont work anyway. So we will need to find another way.

0reactions
babichjacobcommented, Feb 14, 2022

Thanks for the report and patience! This has been fixed by an internal refactoring in f29c47d991cc8f115514d33d9d75b56ac22eed6c.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable self-closing tag if empty #284 - GitHub
Describe the bug Hello, I think when the html tag is empty, it should use self-closing on format. When I'm writing code, sometimes...
Read more >
Docs • Svelte
Complete documentation for Svelte.
Read more >
html - Svelte: Error from Prettier when I try use self-closing tags ...
I'm a newbie in coding (I have some experience in MERN stack), but I'm new to Svelte and I'm confused about this error:...
Read more >
[sveltekit] Conditional render based on user store w/ supabase ...
I'm using Supabase auth and have a user store: // Session store import { writable } from 'svelte/store' export const user = writable(false)....
Read more >
Layouts – Vercel Docs
Pages can be wrapped in a layout component using the <slot> tag, which indicates where the child component should be placed within the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found