Skip to main content
100%

JSX Transpilers by Bundle Size

✓ Published0🌍 Public
CCurran Kelleher
Last edited Feb 16, 2019
Created on Feb 15, 2019
Forked from Customizing Axes

This bar chart compares the minified bundle sizes (in kB) of various JSX transpilers, from the largest at 545.7 kB (Bublé) down to the smallest at 9.6 kB (acorn-jsx). Built with React and D3 v5, it renders as an SVG using `scaleLinear` for the x-axis and `scaleBand` for the y-axis, with axis labels and bar labels positioned conditionally for values under 20 kB. Data comes from bundlephobia.com, loaded via `csv('data.csv')`, with black tick lines removed and a title displayed above the plot.

AI-generated description

In my quest to make VizHub awesome, one of the forefront features is JSX support. Initially, Bublé was added, as this seemed the path of least resistance. Unfortunately, this adds quite a bit of heft to the overall VizHub app bundle. This chart is an exploration of comparative bundle sizes for various means of transpiling JSX into JS, for potential use within VizHub as its "JSX Engine". Bundlephobia.com was used to get bundle size (minified, not GZipped) for each package.

The clear winner looks to be acorn-jsx. Since we're already using Rollup which has a dependency on Acorn, we'd really only be adding its 9.6 kB to our bundle.

MIT Licensed

Similar vizzes