3 ms·
> you get a Babel like plug-in ecosystem for AST transformations and such This is trivial to do with esbuild, for what it's worth.
by junon 5y ago
> you get a Babel like plug-in ecosystem for AST transformations and such
This is trivial to do with esbuild, for what it's worth.
- no_wizard 5y agoESBuild does not support any AST transforms directly You can add it, via plugins, but its a serious limitation for a project like Next.js which require's these types of transforms You also end up with diminishing returns with the more plugins in you add to esbuild, and I imagine its worse with js plugins than it is with go based ones, none the less, you have zero access to it directly
- junon 5y agoI never said it supports AST transformations directly. I just said they were trivial to do with esbuild. Our build times remain at 0.5s with pretty extensive source transformers in JavaScript plugins in esbuild. This is down from 5-8 minutes using rollup.
- no_wizard 5y agoI'd need a lot more context to understand what you mean by "trivial" and "extensive", respectfully
- junon 5y agoIt is trivial to write extensions for esbuild. We've written extensive plugins to perform ast transformations that all run, collectively, in under 0.5 seconds. Make a plugin, add acorn and escodegen. It isn't difficult. I don't see what is difficult to understand.