Closed ggrossetie closed 3 years ago
I also have another prototype based on https://rollupjs.org/ (instead of esbuild) which relies on a Babel plugin to transpile the code and https://github.com/terser/terser to minify the code.
I've merged #41 - Can I just close this one without merging or is there anything we need from it?
I've merged #41
Cool :+1:
Can I just close this one without merging or is there anything we need from it?
Yes, we can close this pull request, it was only intended to showcase benefits and drawbacks of esbuild
compared to rollup
.
What I did
src/js/site.js
(as you can see we can now use ES6+ syntax)The build is a lot faster (esbuild is written in Go with a JavaScript API) from ~12s to ~2s. We will probably need to perform extensive tests to ensure that there is no regression.
Before
After
Files generated by esbuild are roughly equivalent to browserify + uglify in size.