3 ms·
esbuild is fast but it has a lot of place you have to figure out yourself and get into your way of doing thing. 1. dev server: you have to write a bit of code
by kureikain 5y ago
esbuild is fast but it has a lot of place you have to figure out yourself and get into your way of doing thing.
1. dev server: you have to write a bit of code for this server to act as webpack dev server
2. scss: need to install plugin, and plugin cannot use from command line then you need to write a bit of JavaScript
3. global function: if you do `process.env` now you need to inject into build script
4. node package: if the package use node stuff you have to define thing like `fs/stream` into package.json
very quickly it get into your way of doing thing.
However, once you get past that base line, the cost is constant, the complexity just stop right there and not adding up.
Plus, the speed is amazing.
- eyelidlessness 5y ago3. You can inject anything you want without a plugin with `inject`. 4. You can just use `target: node` (or node12, node14.6, etc)
- Sheepsteak 5y agoThis is exactly what I found when I tried esbuild a few months ago. I gave up and went with Parcel 2 at the time as I found it easier to get going (although there were teething problems with Parcel being beta at the time). I need to give esbuild another go I think.
- rwieruch 5y agoesbuild is partially [0] used in Vite [1] where you get a dev server et al. - [0] https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuild https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuil... - [1] https://vitejs.dev/ https://vitejs.dev/
- pineconewarrior 5y agoHow is the SCSS performance? I've tried just about every trick in the book in an attempt to get our bootstrap-based SCSS projects to compile faster, and I'm at my wits end with it. Any chance you can share your config?
- kureikain 5y agoMy project is small and it's amazing fast to me as well. It's basically just outsource its job to another cli. I used esbuild-plugin-sass This is the gist https://gist.github.com/v9n/c40a6ad2078d09dd86117924b415b7fb https://gist.github.com/v9n/c40a6ad2078d09dd86117924b415b7fb As far as I know, esbuild has no intention to integrate with CSS and will outsorce it to plugin. I used
- pineconewarrior 5y agoThank you so much for sharing! I'll give this a shot really quick