days
-6
-5
hours
-2
0
minutes
-4
-9
seconds
-3
-2
search
Less waiting time means more developing time

Pax: Keep the peace with the fastest JavaScript bundler in the galaxy

Jane Elizabeth
Pax
© Shutterstock / FlashMovie

Introducing Pax, a bundler that lets you handle code at warp speed. Developers can spend less time waiting and more time actually developing with this lightweight JavaScript bundler.

No one is very good at waiting anymore. As our pages load faster and faster, it’s almost a wonder anyone survived the dial-up years of the internet. Yet, why should you wait on your bundler? Introducing Pax, the fastest JavaScript bundler in the galaxy.

Instead of dithering around, Pax cuts through to the heart of the matter. How?

Pax is parallelized, making the most of the cores it has available. It’s also incredibly lightweight; a minimal footprint means less to bloat to slow it down.

Most importantly, it only pays attention to the things it needs to. Pax ignores anything that isn’t JavaScript dependency resolutions in the source code. Why should it waste time on things it doesn’t really need to know? It only wastes time.

Developers can use Pax to iterate to their hearts content when actually writing code. When speed is of the essence and you want to stay in the zone.

How fast is Pax? Pretty darn speedy. Pax can shave off actual seconds from a compile.

time pax index.js bundle.js
real  0m0.015s
user  0m0.006s
sys   0m0.006s 

That kind of speed makes the whole developing experience easier to manage. Less waiting time means more developing time.

SEE ALSO: Jetpack: The newest addition to the package manager family

Getting Pax

Want to try out the bundler that can manage code in seconds? Pax can be installed with rustup or cargo. Just run

curl https://sh.rustup.rs -sSf | sh

Pax is easy to use once installed.

// index.js:
const itt = require('itt')
const math = require('./math')
console.log(itt.range(10).map(math.square).join(' '))

// math.js:
exports.square = x => x * x
> pax index.js bundle.js

After that, add script src="bundle.js" and you’re ready to go.
Whenever you change a file, pass -w to rebuild whenever you change a file.

pax -w index.js bundle.js
 ready bundle.js in 1 ms
update bundle.js in 1 ms
...

More information is available here or on GitHub.

Author
Jane Elizabeth
Jane Elizabeth is an assistant editor for JAXenter.com.