Esbuild – An extremely fast JavaScript bundler
11–20 of 288 posts
Re: Esbuild – An extremely fast JavaScript bundler
#12Re: Esbuild – An extremely fast JavaScript bundler
#13Re: Esbuild – An extremely fast JavaScript bundler
#14Earlier quoted context omitted.
> How many scripts does a site need to make it feel faster when bundled? Depends on what you're building. If you have many nested dependencies, you need to bundle them, and not rely on the browser to resolve them at runtime and do dozens of roundtrips to the server to fetch them.
That contradicts my experience and what I just described. In my experience, sites do feel instant even if they load dozens of scripts.
If they’re nested dependencies (where you don’t identify the next necessary js until you have the first one in hand), the dependency won’t start getting fetched until the predecessor is retrieved. So you wait your connection speed multiplied by depth (x2; roundtripped)
The goal of the bundler is to take the second scenario and turn it into the first scenario.
Re: Esbuild – An extremely fast JavaScript bundler
#15How is it possible to be so fast?
2. It’s written in Go
Re: Esbuild – An extremely fast JavaScript bundler
#16Isn't the browser also an extremely fast Javscript bundler? How many scripts does a site need to make it feel faster when bundled? When I visit websites that are rendered serverside, they usually feel instant to me. Even when they load a dozen scripts or so.
Re: Esbuild – An extremely fast JavaScript bundler
#17esbuild is fast but it has a lot of place you have to figure out yourself and get into your way of doing thing. 1. dev server: you have to write a bit of code for this server to act as webpack dev server 2. scss: need to install plugin, and plugin cannot use from command line then you need to write a bit of JavaScript 3. global function: if you do `process.env` now you need to inject into build script 4. node package…
4. You can just use `target: node` (or node12, node14.6, etc)
Re: Esbuild – An extremely fast JavaScript bundler
#18Are there any tools that transform HTML and other files? For example, lets say I have an tag with a src attribute that points to a local image. Can I automatically replace that with a tag with various formats (jpg, webp, avif) and sizes?
Re: Esbuild – An extremely fast JavaScript bundler
#19Isn't the browser also an extremely fast Javscript bundler? How many scripts does a site need to make it feel faster when bundled? When I visit websites that are rendered serverside, they usually feel instant to me. Even when they load a dozen scripts or so.
> How many scripts does a site need to make it feel faster when bundled? Depends on what you're building. If you have many nested dependencies, you need to bundle them, and not rely on the browser to resolve them at runtime and do dozens of roundtrips to the server to fetch them.
The creator of Rails talks about it here: https://world.hey.com/dhh/modern-web-apps-without-javascript...
Re: Esbuild – An extremely fast JavaScript bundler
#20Earlier quoted context omitted.
> How many scripts does a site need to make it feel faster when bundled? Depends on what you're building. If you have many nested dependencies, you need to bundle them, and not rely on the browser to resolve them at runtime and do dozens of roundtrips to the server to fetch them.
That contradicts my experience and what I just described. In my experience, sites do feel instant even if they load dozens of scripts.
The bundler will have those preprocessed and bundled together.