News for hackers. Stuff that matters.
Re:Vercel announces Turbopack, the successor to Webpack by no_wizard on Tuesday October 25, 2022 @03:51PM (#33335309)
Really hope this gets a competent library mode. Webpacks library mode never really evolved to meet the needs of things. Vite has a good library mode but it has its own limitations.

Pure rollup is still the best for building libraries, by and large (maybe esbuild now? but I think rollup is more efficient in its output still).

If this has a good, solid library mode that works like rollup with the power of the webpack-like asset graph, it'd actually be amazing for the community as a whole.

Re:Vercel announces Turbopack, the successor to Webpack by domoritz on Tuesday October 25, 2022 @04:15PM (#33335552)
Yes. I mostly build libraries and rollup still beats everything in compatibility (esm, umd, cjs, etc) and output quality. It's slow, though, and I would love a faster alternative. Esbuild doesn't do tree shaking as well as rollup.
Re:Vercel announces Turbopack, the successor to Webpack by beezlewax on Tuesday October 25, 2022 @04:56PM (#33336076)
Can esbuild support esm or umd etc via plugins? I've looked at using it but these formats are an unfortunate requirement for the builds I need to do.

I noted that esbuild doesn't fully support es5 transpilation and this will hold it back from some usage.

Re:Vercel announces Turbopack, the successor to Webpack by andrew_ on Tuesday October 25, 2022 @07:33PM (#33337660)
Vite uses it under the hood and has it running crazy fast.
Re:Vercel announces Turbopack, the successor to Webpack by Vinnl on Wednesday October 26, 2022 @03:07AM (#33340679)
I think Vite only uses it for the production build, no? As far as I know Vite doesn't do bundling (yet) in dev mode.
Re:Vercel announces Turbopack, the successor to Webpack by silverwind on Wednesday October 26, 2022 @03:23AM (#33340770)
Vite uses both esbuild and rollup for the prod build. When doing React, it also adds Babel. This chaining of tools is the reason why it's so slow.
Re:Vercel announces Turbopack, the successor to Webpack by andrew_ on Wednesday October 26, 2022 @08:11AM (#33342488)
"so slow." JS-perf world is quite insufferable. We're talking 0.09s vs 0.01s https://mobile.twitter.com/youyuxi/status/158506616237077709...