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

Enable pnpm symlinks without hoisting #6

Open
karlhorky opened this issue Apr 14, 2023 · 4 comments
Open

Enable pnpm symlinks without hoisting #6

karlhorky opened this issue Apr 14, 2023 · 4 comments

Comments

@karlhorky
Copy link
Contributor

karlhorky commented Apr 14, 2023

Wonder if this new @rnx-kit/metro-resolver-symlinks could be used also with an Expo project... 🤔 (to avoid the node-linker=hoist in pnpm)

facebook/metro#1 (comment)

Looks like this kitchen-sink Expo app is using it 👀

https://github.com/tamagui/tamagui/blob/fd7105ebf1ce6feb362dcad5da64f205e6b71b69/apps/kitchen-sink/metro.config.js#L2-L9

cc @ProchaLu

@karlhorky
Copy link
Contributor Author

Reant Native 0.72 with symlink support was just released:

https://reactnative.dev/blog/2023/06/21/0.72-metro-package-exports-symlinks

As soon as Expo upgrades and supports this version, we can try it out

@karlhorky
Copy link
Contributor Author

karlhorky commented Jan 27, 2024

Expo SDK 50 is out, which uses React Native 0.73 internally.

React 0.73 has made symlink support stable.

If it doesn't work out of the box (without node-linker=hoisted or any other workarounds), maybe the details in this issue would be helpful:

Specifically, maybe this workaround is helpful (although unstable_enableSymlinks no longer needed for RN 0.73):

const path = require('path');

const config = {
  watchFolders: [path.join(__dirname, '..', '..')],
  resolver: {
    unstable_enableSymlinks: true,
    unstable_enablePackageExports: true,
  },
};

@karlhorky karlhorky changed the title Explore @rnx-kit/metro-resolver-symlinks for pnpm without hoisting Enable pnpm symlinks without hoisting Jan 27, 2024
@karlhorky
Copy link
Contributor Author

Seems like Expo SDK 50 with RN 0.73 is still a problem for pnpm without hoisting config, at least for now:

@karlhorky
Copy link
Contributor Author

Also asked Expo and pnpm maintainers over here in the open pnpm issue about whether it would be possible to get symlinks support out of the box:

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