We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 currently doesn't support tree shaking out of the box. And so all @sentry/* dependencies are included in the final bundle.
@sentry/*
Some packages can be easily excluded using the metro resolver options:
const config = { resolver: { resolveRequest: (context, moduleName, platform) => { if (moduleName.includes('@sentry/replay')) { return { type: 'empty' }; } return context.resolveRequest(context, moduleName, platform); }, }, };
Sentry Metro config will automatically remove web replay for mobile platforms and expose an option to remove it for web builds.
const { withSentryConfig } = require('@sentry/react-native/metro'); const m = mergeConfig(getDefaultConfig(__dirname), config); module.exports = withSentryConfig(m, { includeReplay: true });
The text was updated successfully, but these errors were encountered:
lucas-zimerman
No branches or pull requests
Description
Metro currently doesn't support tree shaking out of the box. And so all
@sentry/*
dependencies are included in the final bundle.Some packages can be easily excluded using the metro resolver options:
Current solution
Proposed solution
Sentry Metro config will automatically remove web replay for mobile platforms and expose an option to remove it for web builds.
The text was updated successfully, but these errors were encountered: