3 ms·
> 1) esbuild isn’t good at splitting I've found esbuild is pretty good at splitting when source formats and outputs are ESM. (Given the name esbuild a focus on
by WorldMaker 3y ago
> 1) esbuild isn’t good at splitting
I've found esbuild is pretty good at splitting when source formats and outputs are ESM. (Given the name esbuild a focus on/priority for ESM input/output makes sense to me.)
Is this maybe Vite team saying that they still have too many brownfield CJS dependencies and still don't believe in ESM output for production bundles in 2024?
- rk06 3y agoEven if their dependencies were esm only, Vote may be used in projects which have cjs dependencies. Hence need to support it
- WorldMaker 3y agoesbuild handles CJS dependencies just fine and had been what Vite was using in development for a long time anyway. It doesn't split CJS dependencies or tree-shake them as automatically/smartly as it could, but it still supports splitting them and there are manual workarounds. I think the bigger problem, from my experience here, is still the question of not moving to ESM as the default production output. That seems out of date.