Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eric-burel opened this issue Apr 6, 2022 · 3 comments

Comments

@eric-burel
Copy link

eric-burel commented Apr 6, 2022

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

@eric-burel eric-burel changed the title Fix support of Next.js Fix support of Next.js 12 + ES modules packages (get bundled as internal dependencies instead of staying external because of the symlink) Apr 6, 2022
@wclr
Copy link
Owner

wclr commented Apr 9, 2022

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

@eric-burel
Copy link
Author

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.

@jorabra
Copy link

jorabra commented Sep 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants