A new JS bundler and minifier is available as an experimental hobby project, but there’s something a little different about esbuild. With the help of Golang, it’s much faster than the rest.
Let’s take a quick tour of this JS tool as well a look forward to what’s on the agenda for webpack.
Let the numbers speak for themselves:
The key to esbuild’s speed lies in its language of choice; it is written in Go. Since Go is such a speedy language, it allows this bundler to take advantage of that and avoids slowdown.
According to its README, it currently supports:
- CommonJS modules
- ES6 modules
- Bundling with static binding of ES6 modules using
- Full minification with
--minify(whitespace, identifiers, and mangling)
- Full source map support when
- Compile-time identifier substitutions via
- Path substitution using the
- Automatic detection of
Test it out
As a word of caution, this bundler should not be used in production and has not been tested in a production environment. The creator states it is a hobby project created during winter break. Thus, it includes potential bugs and all the associated risks of new code and experimental projects.
However, feel free to give it a try, if only as an experiment to see how quick JS tooling can potentially be.
SEE ALSO: How Curve is getting ahead with Golang
Looking towards webpack 5
bundle.js and boasts a customizable plugin interface with a large ecosystem.
Webpack 5 is on its way and will contain some new experimental features. The start of an article series by Sergey Melyukov will break down what to expect in v5. Read the first entry and explore asset modules.
As of right now, there is no set release date for webpack 5, as it is currently in beta phase and collecting user feedback. All of the major changes and features are complete with this version. So now, all that’s left is achieving better stability and further tests.
View the changelog for more information about the upcoming new features.