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

metro: add support for unstable_enablePackageExports #2255

Closed
tido64 opened this issue Feb 27, 2023 · 2 comments · Fixed by #2256
Closed

metro: add support for unstable_enablePackageExports #2255

tido64 opened this issue Feb 27, 2023 · 2 comments · Fixed by #2256
Labels
enhancement New feature or request feature: metro This is related to Metro

Comments

@tido64
Copy link
Member

tido64 commented Feb 27, 2023

Metro 0.75.1 will be the first version with support for exports map: facebook/metro#670 (comment)

We need to make sure that when this flag is enabled, our plugins will also honor it.

@The-White-Fang
Copy link

I am not sure if I was using it correctly but for me, this option was not working when used with @rnx-kit/metro-resolver-symlinks

I was using the following config

const { makeMetroConfig } = require('@rnx-kit/metro-config');
const MetroSymlinksResolver = require('@rnx-kit/metro-resolver-symlinks');

module.exports = makeMetroConfig({
	projectRoot: __dirname,
	resolver: {
		resolveRequest: MetroSymlinksResolver(),
		unstable_enablePackageExports: true,
	},
});

After removing @rnx-kit/metro-resolver-symlinks and replacing it with unstable_enableSymlinks everything started working fine again.

This is the updated config

const { makeMetroConfig } = require('@rnx-kit/metro-config');

module.exports = makeMetroConfig({
	projectRoot: __dirname,
	resolver: {
		unstable_enableSymlinks: true,
		unstable_enablePackageExports: true,
	},
});

@tido64
Copy link
Member Author

tido64 commented May 10, 2024

I am not sure if I was using it correctly but for me, this option was not working when used with @rnx-kit/metro-resolver-symlinks

Hi, can you open a bug report here: https://github.com/microsoft/rnx-kit/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml

We need more details to help you investigate this. When you say "working fine again", what exactly didn't work before? Did it crash? Did the bundling fail? Did the app fail to run? And most importantly, we want a minimal repro. If we cannot reproduce the error you're seeing, we cannot help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: metro This is related to Metro
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants