Skip to content

Conversation

@manuel3108
Copy link
Member

This is basically #568 but with a proper pr description and re-implemented from scratch, as the other branch was horribly out of date.

Closes #94
Closes svelte-add/svelte-add#193
Closes svelte-add/svelte-add#507

Relates sveltejs/svelte#16188

This pr is based on #620, since svelte alreday uses esrap@2

Step 1 (support for svelte files):

  • support for svelte specifc html syntax (@attach, self closing component tags, transitions, etc) (NOTE: referenced svelte pr was last updated in june, everything that got released after that is not going to work right now)
  • check and adapt all other usages of parseSvelte (approximately 10 occurences)
  • make generated code from print more readable, probably needs to be done in feat: add print(...) function svelte#16188

Step 2 (reduce deps, different pr probably)

  • we currently use many different libraries for parsing and serializing JS / CSS / HTML. All of that could in theory be handled by svelte/compiler. Check which hoops we need to jump to make that happen. We could potentially drop the following deps:
    • dom-serializer
    • domhandler
    • domutils
    • htmlparser2
    • postcss

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2025

⚠️ No Changeset found

Latest commit: ccf1ab3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 26, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@751
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@751

commit: ccf1ab3

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.

Use { parse } from 'svelte/compiler' End tags added for self-closing elements HTMLX (aka Svelte's templating language) proper support

2 participants