Yunfei He

Results 368 comments of Yunfei He

i'll take a look today and see if we can merge it into main.

https://github.com/rolldown/rolldown/blob/247bc4b185a8cc95b7bc8727b0e81871f333824a/crates/rolldown/src/stages/generate_stage/compute_cross_chunk_links.rs#L222-L227 probably due to not following these changes in the above code https://github.com/rolldown/rolldown/blob/3d3028452d77854a8cd596a5094d28b37d3ce2ba/crates/rolldown/src/stages/generate_stage/code_splitting.rs#L52-L68

Emit thounds of this warning is undesireable. I think having `SOURCEMAP_BROKEN` warning would be enough.

* **#1762** 👈 * `main` This stack of pull requests is managed by Graphite. Learn more about stacking. Join @hyf0 and the rest of your teammates on Graphite

Since we are porting esbuild, esbuild also have this behavior and explain the reason in - https://github.com/evanw/esbuild/issues/946 - https://github.com/evanw/esbuild/issues/1232 We met this also in rolldown's self-bootstrapping and used workaround like...

Some cases: - `import 'ext'` and `require('ext')` will fall into different resolve logic of node

Since we have a `platform: node` option, I guess it's ok rolldown support injecting automatically https://github.com/rolldown/rolldown/blob/8acc362586e14ec4fa1e513e05c981988b077bd3/packages/rolldown/rolldown.config.mjs#L40-L43 if rolldown detects `require` while targeting `esm` output. But transforming `require` into `import` is...

@jasonkuhrt Could you post your project with your attempt in the discussion tab, we might give a shot when we got time.