Yunfei He
Yunfei He
> We should apply the skipSelf option for this case as well to prevent infinite loop. I want talk about this one a bit more. I guess it's also intuitive...
Notes: - It seems that parcel's transform deisgn supprot change `type` too. Might want to invesigate it for reference too.
Since our config loding logic is purely on js side, this could be a good first issue.
It's complicate to support this hook inside rolldown. I'll suggest to use regex and transform hook to do it yourself.
Somo notes: - Chunk name allows to be duplicate.
I compared the result to esbuild. It seems rolldown resolves to the cjs version of `compiler-sfc` while esbuild resolves to the browser version.
With `format: 'cjs'`, rolldown will infer the platform as `node` instead of `browser`, because `platform: 'browser'` + `format: 'cjs'` seems absurd. However, it makes rolldown resolve to the cjs version...
Short-term conclusions: 1. Improve document of `platform` 2. Remove the inferring behavior to align with esbuild
A simple test on how `import()` behave in `.cjs` environment. ``` ➜ node-play node -v v22.14.0 ``` --- --- ---
> [@hyf0](https://github.com/hyf0) `@vue/compiler-sfc` still includes `node` conditions, so regardless of how it is imported, the CJS version will always be loaded in a Node environment. > > "exports": { >...