chore: use parse & print from svelte/compiler#751
Conversation
|
commit: |
|
This is ready. Depending on how good tree-shaking works, this is going to temporarily increase our bundle size. Personally, I wouldn't bother because this is won't be a problem as soon as we tackle step 2 described above in a different PR Edit: to be merged after #620 as this is the base for everything. Reviewing this after #620 was merged should also dramatically reduce the diff |
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@2Step 1 (support for svelte files):
@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)parseSvelte(approximately 10 occurences)printmore readable, probably needs to be done in feat: addprint(...)function svelte#16188Step 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 bysvelte/compiler. Check which hoops we need to jump to make that happen. We could potentially drop the following deps: