Hacker News new | ask | show | jobs
by synergy20 1004 days ago
will these unneeded polyfills etc be removed by treeshaking and code splitting in the production build via bundlers?

are Bun and Deno solving this problem to some extent?

node.js/bun/deno need a battery-included stdlib to me like what python provides.

1 comments

They are unfortunately not removed, because the way they are used makes it difficult for bundlers to detect them.

Deno encourages you to submit the original sources which can be even in TypeScript if you want. The users are very close to the newest Deno release and there is barely anyone staying on old versions. This works because Deno takes semver very seriously, which in turn encourages folks to upgrade. It removes the need for polyfills and allows you to always use the latest JS features.

Disclaimer: I work at Deno