Yunfei He

Results 368 comments of Yunfei He

I think chunk splitting works correctly. Currently our algorithm is similar to esbuild's and yes > For this "issue", we have no plan to 1:1 port rollup's chunk splitting algorithm,...

@sapphi-red I actually wonder should we put `minify` step before `renderChunk`. The current timing isn't a result of reflection. I put it before `renderChunk` without thinking deeply. Time to revise...

Follow up issue: what's the suggest way to add new code and leave them untouched by the builtin minify step?

https://github.com/rollup/plugins/blob/master/packages/terser/src/module.ts Rollup minifies code using `renderChunk`, to be compatible with rollup's mental model, current Rolldown's beheavior makes sense. > Follow up issue: what's the suggest way to add new code...

> I think we should provide a plugin or add output.postBanner/output.postFooter. @sapphi-red I'm thinking have a plugin `rolldown-plugin-xxxx` under https://github.com/rolldown-contrib? Or you prefer to add hooks in vite(which doesn't solve...

> I was thinking of adding an option to Rolldown or provide a rolldown plugin. > > I'm leaning towards having an option as I think this feature would be...

Some notes: - The timing of `postBanner\Footer` would be after internal minify but before `generateBundle`, which means the flow would be like `renderChunk` -> `argumentChunkHash` -> `InternalHashCompute` -> `ApplyHash/Generate Assets`...