Yunfei He

Results 368 comments of Yunfei He

Duplicating modules is quite a challenge to the current bundler archetecture: - It breaks the assumtion of each module is a singleton. - It might causes duplicating AST too, because...

@CyberAP > I am still not sure how to reduce the initial amount of JS requests to

> > Currently the smallest number you could get for the initial requests is the (number of initial entries + 1 common that contains all shared modules) > > [@hyf0](https://github.com/hyf0)...

I just found this project has 5k+ entry points in bundling. Definately something wrong there. I'll keep looking into it at night. ``` EntryPoint { name: None, id: 5896, kind:...

Some updates: It did have a 5k+ dynamic entries in `@tabler/icons-react/dist/esm/dynamic-imports.mjs`. The reason may be caused by a string of isssues. And the first issue I saw it that: -...

Glad to tell that the #4687 should solves the problem. (Ignore the build time, I'm using debugging mode.

Yeah. That's current esbuild's behavior for dealing with external modules: https://hyrious.me/esbuild-repl/?version=0.23.0&b=e%00entry.js%00import+%7B+parse+%7D+from+%27ext%27%0Aimport+%27.%2Ffoo%27%0Aconsole.log%28parse%29&b=%00foo.js%00import+%7B+parse+%7D+from+%27ext%27%0Aconsole.log%28parse%29&o=--bundle+--splitting+--format%3Desm+--external%3Aext+--outdir%3Ddist However, I will see how to improve this pattern.

Yeah. I think, in this case, rolldown achieves the same goal as webpack. On-demand wrapping behaves like the concat modules feature of webpack. They both rely on calculating module execution...

With applying manual anlalysis and on demand wrapping, it looks like ```js //#region rolldown:runtime var __getOwnPropNames = Object.getOwnPropertyNames; var __esm = (fn, res) => function() { return fn && (res...

Short-term conclusions: 1. Apply on demand wrapping 2. See how the effect goes on the real-wrold project