yalc icon indicating copy to clipboard operation
yalc copied to clipboard

Fix support of Next.js 12 + ES modules packages (get bundled as internal dependencies instead of staying external because of the symlink)

Open eric-burel opened this issue 3 years ago • 3 comments

Hi, Yalc is currently incompatible with Next.js + ES Modules. The fault is probably on Next side, but I'd like to raise your attention on this issue as it may affect other framework based on Webpack 5 depending on how they handle ESM and make Yalc hard to use in real-life context.

Here is the ticket on Next side: https://github.com/vercel/next.js/issues/35110

I've managed to produce a reproduction, and maybe pinpoint the relevant files, but this is a very hard issue so any help to get this fixed is welcome :)

Maybe some alternative solution could make Yalc immune to this kind of issue, eg storying .yalc in node_modules

eric-burel avatar Apr 06 '22 13:04 eric-burel

If you want help, reproduction repo with a clear description and instructions would be needed.

wclr avatar Apr 09 '22 20:04 wclr

Hi, yes sorry I had linked the repro in Next ticket but forgot to add it here: https://github.com/VulcanJS/repro-bug-yalc-next-12-1 There is a script at the root that will simply install the package and the Next app, and link the package using Yalc.

This issue seems to be reproduceable with "yarn link" as well but I havent tested.

eric-burel avatar Apr 11 '22 06:04 eric-burel

Any update on this issue? @eric-burel, did you find any workaround?

I'm experiencing this issue using Next 13.3. It is quite sad that our yalc workflow for testing packages locally is rendered useless.

jorabra avatar Sep 06 '23 20:09 jorabra