Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Svelte is called a compiler while other frameworks are called transpilers

I recently got this question in school about frontend javascript frameworks, "Why are other frameworks that convert code into vanilla javascript called transpilers, but Svelte is called a compiler?". I couldn't find anything about it on the internet and I don't really understand it. Could someone please explain it to me in simple terms?

like image 559
Pulman3 Avatar asked Dec 18 '25 08:12

Pulman3


1 Answers

Technically Svelte is also a transpiler. The main distinction between the terms is that a transpiler converts source code to source code while a compiler should convert source code to machine code (much more low level).

Svelte outputs JS, which is still a high level language but at the same time, the code is not exactly what you would call "human readable" and JS is the lowest level web front-end language that you can compile to with the exception of WebAssembly (which is not always an option due its limitations, like not being able to access the DOM directly).

like image 121
H.B. Avatar answered Dec 20 '25 22:12

H.B.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!