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

Dont create a fragment at all for DOM-less component #3831

Conversation

tanhauhau
Copy link
Member

Fix #2200

@tanhauhau tanhauhau force-pushed the tanhauhau/no-create-fragment-if-not-needed branch from 0cbe209 to aa0341c Compare October 31, 2019 14:18
@Rich-Harris Rich-Harris merged commit f7833ac into sveltejs:master Nov 6, 2019
@Rich-Harris
Copy link
Member

Ah yes, this is great — will shrink down my Svelte GL apps nicely 🍻

@tanhauhau tanhauhau deleted the tanhauhau/no-create-fragment-if-not-needed branch November 6, 2019 12:55
@mustafa0x
Copy link
Contributor

	has_content() {
		const chunks = ['intro', 'outro', 'create', 'hydrate', 'claim', 'mount', 'update', 'destroy'];
		return this.renderer.options.dev ||
			this.first ||
			this.event_listeners.length > 0 ||
			chunks.some(k => this.chunks[k].length > 0) ||
			this.has_animation;
	}

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.

Don't create a fragment at all for DOM-less components
3 participants