cibernox / svelte-intl-precompile

I18n library for Svelte.js that analyzes your keys at build time for max performance and minimal footprint
https://svelte-intl-precompile.com
ISC License
274 stars 13 forks source link

Babel alternatives #66

Open benmccann opened 8 months ago

benmccann commented 8 months ago

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

cibernox commented 8 months ago

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.

benmccann commented 8 months ago

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