wclr / yalc

Work with yarn/npm packages locally like a boss.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

eric-burel opened this issue · 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: vercel/next.js#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

commented

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

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.

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.