svelte-intl-precompile icon indicating copy to clipboard operation
svelte-intl-precompile copied to clipboard

Babel alternatives

Open benmccann opened this issue 2 years ago • 2 comments
trafficstars

I know this would be a big change, but I thought I should at least mention it and see if it's something you'd be open to. Babel pulls in a ton of dependencies and is not used all that widely in the Svelte ecosystem, so they're new dependencies for most projects using svelte-intl-precompile. I'd be interested to see if we could do without it

https://npmgraph.js.org/?q=svelte-intl-precompile

benmccann avatar Oct 11 '23 18:10 benmccann

I only need to be able to generate an AST, modify it and put it back into JS. Perhaps something lower level like acorn would suffice, i'm not sure.

cibernox avatar Oct 11 '23 19:10 cibernox

Yeah, for most Svelte tools we use a combination of acorn, estree-walker, and magic-string. These are already used by the compiler so they add no extra dependencies. estree-walker is being swapped for zimmerframe in Svelte 5, so it might be nicer to use it

benmccann avatar Oct 12 '23 18:10 benmccann