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

@swc-jotai/react-refresh, jotai-optics and turbopack cannot work together #20

Open
yf-yang opened this issue Dec 18, 2023 · 1 comment

Comments

@yf-yang
Copy link

yf-yang commented Dec 18, 2023

reproduction: https://github.com/yf-yang/turbopack-swc-jotai-bug

This bug only happens when turbopack is enabled

pnpm dev --turbo # with turbopack enabled

When calling

const n = globalThis.jotaiAtomCache.get("index.modern.js/n", t());

Output:

Uncaught ReferenceError: t is not defined

I have no idea what that t() is, @Thisen do you have any ideas?

@yf-yang
Copy link
Author

yf-yang commented Dec 18, 2023

Emmm, may not be an issue with turbopack, maybe that's something after upgrading to next14. I am not sure what they do with the bundler when upgrading from 13.5 to 14. I guess something are replaced with swc implementations.

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

1 participant