Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow reserved snippet names when embedded in component #14150

Closed
wants to merge 1 commit into from

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 4, 2024

This PR enables reserved names for snippets when they're embedded within a component.

<script>
	import Child from './Child.svelte';
</script>

<Child>
	{#snippet const()}
		<p>hello world</p>
	{/snippet}
</Child>
<script>
	const { const: const_snippet } = $props();
</script>

{@render const_snippet()}

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-svelte-14150-svelte.vercel.app/

this is an automated message

Copy link

pkg-pr-new bot commented Nov 4, 2024

pnpm add https://pkg.pr.new/svelte@14150

commit: 140d6b1

@trueadm trueadm closed this Nov 5, 2024
@dummdidumm dummdidumm deleted the snippet-reserved branch November 5, 2024 09:37
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