mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: esbuild for bundling mediagoblin's js deps


From: Ben Sturmfels
Subject: Re: esbuild for bundling mediagoblin's js deps
Date: Fri, 17 Sep 2021 14:13:35 +1000
User-agent: mu4e 1.6.5; emacs 27.2

Hi jgart,

On Fri, 17 Sep 2021, jgart wrote:

> WDYT of bundling mediagoblin's current javascript dependencies with esbuild
> instead of using bower to manage them?

This could be useful, though esbuild and bower do different jobs. Bower
is used only to obtain the packages from NPM (see bower.json), so adding
esbuild wouldn't directly allow us to remove Bower. We'd need to "vendor
in" these dependencies into the MediaGoblin codebase, or use NPM
directly to allow us to remove bower.

> We could use the --minify option to bundle (mediagoblin) before
> publishing it so that it's a smaller download and so it spends less
> time reading from the file system when being loaded.
>
> https://esbuild.github.io/getting-started/#bundling-for-the-browser

Minifying may shrink the download somewhat, since we're currently using
the non-minified versions. Alternatively we could switch to using the
minified versions with many NPM packages also distribute.

Bundling JS files together is much less benefit under HTTP 2 than it was
under HTTP 1.1, and can in some cases reduce performance and prevent
caching individual JS assets, meaning that changes to any JS requires
re-downloading the whole bundle.

Overall I suggest we look at this after we have an initial working
package.

Regards,
Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]