Comments (7)
My benchmark is only for full production builds. One of my main reasons for creating esbuild in the first place is to demonstrate that production builds don't have to be slow and to encourage existing bundlers to have faster production builds.
I'm not worried about the speed of development builds. It's easy to make development builds fast because you don't need to transform the source code much. In some cases you don't need a bundler during development at all since browsers now support ES6 modules natively. This is the case in my benchmark, for example.
It's great that you're working on a faster compiler! That's really exciting. However, I tried out [email protected]
using the production settings you described and the output is 9.8mb. This is much bigger than the previous size using fuse-box@next
(6.5mb) which itself is much bigger than the output of all other bundlers (~5.9mb). It looks like this is because [email protected]
does not minify the output beyond removing whitespace. I don't consider this a production build on its own because you would need to run it through a minifier before using it in production.
Also the generated output is not valid JavaScript, so this doesn't count as a successful build for my benchmark:
bench/three/fusebox/dist/app.js:35:2761: error: Expected ";" but found "Object"
...ject.assign(exports, __fusereq(4))Object.assign(exports, __fusereq(50))var...
~~~~~~
I'm happy to update the version of FuseBox used in my benchmark when you have a new version that meets the requirements of the benchmark.
from esbuild.
@evanw fair enough. I will make sure it runs and minifies it, then we will update the bench. Thanks.
from esbuild.
I just updated the versions of all packages used in the benchmark and it looks like the latest version of fuse-box@next
pretty much passes my tests for a valid benchmark entry. So I included it and I'm considering this issue fixed. The only caveat I found as far as correctness was that the line numbers for the source map generated by fuse-box seem to be off by one. And with the update, fuse-box is no longer the slowest bundler in my benchmark! It's great to see these performance improvements.
from esbuild.
Thanks! I will check what's wrong. Terser spoils the picture, it takes the longest time.
But in the long run, I am myself considering doing some magic with GO. It would be really cool to use your minifier! Do you have any plans on splitting it into packages ? Like parser, printer, minifier ?
from esbuild.
Do you have any plans on splitting it into packages ? Like parser, printer, minifier ?
I don't have any plans to do that at the moment. However, I do have a JavaScript API for transforming code using esbuild. It can be used to minify code if you pass minify: true
.
from esbuild.
Cool, thanks for that! But I was mainly interested in the GO part. Node.Js Is a Christmas toy compared to GO.
from esbuild.
@evanw is a basic, minimal go api ever going to be possible?
from esbuild.
Related Issues (20)
- serve proxy with http2 possible? HOT 1
- A crash happened between switches of branches HOT 1
- Random "all goroutines are asleep - deadlock!" on a build HOT 2
- "all goroutines are asleep - deadlock!" on a build HOT 7
- esbuild + ESM + NodeJS + Typescript troubles HOT 6
- Different behaviour between external path and external package
- [Feature Request]: extend `onResolve` plugin hook to include import attributes in `import-statement`
- pnpm install error running postinstall scripts HOT 2
- [Feature Request]: Provide a way to selectively keep class / function names HOT 2
- default export interpretation HOT 2
- `--watch` should delete destination files on build errors HOT 4
- Bundled image is broken on the production HOT 3
- Constant folding doesn't simplify inequalities
- Cannot implement import attribute `with { type: "external" }` HOT 2
- css nesting lowering doesn't work when both a pseudo element selector and a class selector is used HOT 1
- Different bundle output between macOS and Ubuntu HOT 1
- TestGradient with "in_hsl_longer_hue" currently fails on ppc64le and s390x HOT 6
- Unable to resolve files with CLI but works from file config HOT 3
- Q: Does the esbuild file loader support changing the file extension? HOT 3
- Are we implementing node esm/cjs interop correctly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esbuild.