Hacker News new | ask | show | jobs
by hajile 1099 days ago
What code does Svelte use internally vs what code winds up compiled into your components? Last I checked, MOST of the code wound up in your components. In fact, this was their entire argument for why people should use Svelte when it launched.

Just look at their "Hello World" application on the Svelte website. 5 lines of code transform into 45 lines of code.

1 comments

If two components use the same code it’s hoisted and both components use the same function declaration.